Changeset 1230


Ignore:
Timestamp:
01/17/12 22:10:47 (4 months ago)
Author:
tschmitt
Message:
  • linuxmuster-setup:
    • Weiteren Rembo-Code entfernt.
    • Postgresqls pg_hba.conf gefixt.
    • Netzwerkkartenmangement überarbeitet.
Location:
main/linuxmuster-base/branches/testing
Files:
1 added
4 deleted
12 edited

Legend:

Unmodified
Added
Removed
  • main/linuxmuster-base/branches/testing/debian/changelog

    r1227 r1230  
     1linuxmuster-base (6.0.0-4ubuntu0) lenny; urgency=low 
     2 
     3  * changed to udev based nic management, nic name will now be used as is. 
     4  * reworked nic-setup scripts and functions in helperfunctions.sh. 
     5  * removed mac_* package templates, added iface_lan to templates. 
     6  * linuxmuster-setup: fixed postgresql's pg_hba.conf template. 
     7 
     8 -- Thomas Schmitt <schmitt@lmz-bw.de>  Tue, 17 Jan 2012 22:04:12 +0100 
     9 
    110linuxmuster-base (6.0.0-3ubuntu0) lenny; urgency=low 
    211 
    312  * linuxmuster-setup: 
    413    * service stop and start fixes. 
    5     * fix: move /var/run and /var/lock to /run and substitute old dirs with links to new dirs. 
    614    * /etc/network/interfaces: removed dns entries for intern interface. 
    7  
    8  -- Thomas Schmitt <schmitt@lmz-bw.de>  Tue, 17 Jan 2012 08:53:42 +0100 
     15    * removed imaging choice, setting imaging per default to "linbo". 
     16 
     17 -- Thomas Schmitt <schmitt@lmz-bw.de>  Tue, 17 Jan 2012 08:59:13 +0100 
    918 
    1019linuxmuster-base (6.0.0-2ubuntu0) lenny; urgency=low 
  • main/linuxmuster-base/branches/testing/debian/postinst

    r1206 r1230  
    7575  # add startup scripts to runlevels 
    7676  update-rc.d linuxmuster-base defaults 
    77   update-rc.d linuxmuster-nic-setup start 40 S . 
    7877 
    7978  # create and correct dirs and files 
  • main/linuxmuster-base/branches/testing/debian/templates

    r1206 r1230  
    229229Type: select 
    230230Choices: ${nic_choices} 
    231 Description: Zuordnung der Netzwerkkarten 
     231Description: Zuordnung der Netzwerkkarte 
    232232 ${nic_desc} 
    233233 
    234 Template: linuxmuster-base/ifmenu 
    235 Type: select 
    236 Choices: ${if_choices} 
    237 Description: ${if_desc} 
    238  Waehlen Sie die zutreffende Zuordnung fuer diese Netzwerkkarte mit den Pfeiltasten aus. Bestaetigen Sie die Auswahl wiederum mit ENTER. 
    239  
    240 Template: linuxmuster-base/mac_extern 
    241 Type: string 
    242 Description: extern MAC 
    243  Keine Eingabe. 
    244  
    245 Template: linuxmuster-base/mac_intern 
    246 Type: string 
    247 Description: intern MAC 
    248  Keine Eingabe. 
    249  
    250 Template: linuxmuster-base/mac_wlan 
    251 Type: string 
    252 Description: wlan MAC 
    253  Keine Eingabe. 
    254  
    255 Template: linuxmuster-base/mac_dmz 
    256 Type: string 
    257 Description: dmz MAC 
    258  Keine Eingabe. 
    259  
     234Template: linuxmuster-base/iface_lan 
     235Type: string 
     236Default: eth0 
     237Description: lan interface 
     238 Keine Eingabe. 
     239 
  • main/linuxmuster-base/branches/testing/share/scripts/helperfunctions.sh

    r1073 r1230  
    379379discover_nics() { 
    380380 
    381         n=0 
    382         # fetch all interfaces and their macs from /sys 
    383         for i in /sys/class/net/bond* /sys/class/net/eth* /sys/class/net/wlan* /sys/class/net/intern /sys/class/net/extern /sys/class/net/dmz; do 
    384  
    385                 [ -e $i/address ] || continue 
    386                 address[$n]=`head -1 $i/address` || continue 
    387  
    388                 if [ `expr length ${address[$n]}` -ne "17" ]; then 
    389                         continue 
    390                 else 
    391  
    392                         toupper ${address[$n]} 
    393                         address[$n]=$RET 
    394                         id=`ls -1 -d $i/device/driver/0000:* 2> /dev/null` 
    395                         id=`echo $id | awk '{ print $1 }' -` 
    396                         id=${id#$i/device/driver/} 
    397                         id=${id#0000:} 
    398  
    399                         if [ -n "$id" ]; then 
    400  
    401                                 tmodel=`lspci | grep $id | awk -F: '{ print $3 $4 }' -` 
    402                                 tmodel=`expr "$tmodel" : '[[:space:]]*\(.*\)[[:space:]]*$'` 
    403                                 tmodel=${tmodel// /_} 
    404                                 model[$n]=${tmodel:0:38} 
    405  
    406                         else 
    407  
    408                                 model[$n]="Unrecognized_Ethernet_Controller" 
    409  
    410                         fi 
    411  
    412                 fi 
    413  
    414                 let n+=1 
    415  
    416         done 
    417         nr_of_nics=$n 
     381 n=0 
     382 # fetch all interfaces and their macs from /sys 
     383 for i in /sys/class/net/bond* /sys/class/net/eth* /sys/class/net/wlan* /sys/class/net/intern /sys/class/net/extern /sys/class/net/dmz; do 
     384 
     385  [ -e $i/address ] || continue 
     386 
     387  iface[$n]="$(basename $i)" 
     388  [ -z "${iface[$n]}" ] && continue 
     389 
     390  address[$n]=`head -1 $i/address` 
     391  [ `expr length ${address[$n]}` -eq 17 ] || continue 
     392 
     393  toupper ${address[$n]} 
     394  address[$n]=$RET 
     395  id=`ls -1 -d $i/device/driver/0000:* 2> /dev/null` 
     396  id=`echo $id | awk '{ print $1 }' -` 
     397  id=${id#$i/device/driver/} 
     398  id=${id#0000:} 
     399 
     400  if [ -n "$id" ]; then 
     401   tmodel=`lspci | grep $id | awk -F: '{ print $3 $4 }' -` 
     402   tmodel=`expr "$tmodel" : '[[:space:]]*\(.*\)[[:space:]]*$'` 
     403   tmodel=${tmodel// /_} 
     404   model[$n]=${tmodel:0:38} 
     405  else 
     406   model[$n]="Unrecognized_Ethernet_Controller" 
     407  fi 
     408 
     409  n=$(( $n + 1 )) 
     410 
     411 done 
     412 
     413 nr_of_nics=$n 
    418414 
    419415} # discover_nics 
     
    422418create_nic_choices() { 
    423419 
    424         n=0 
    425         unset NIC_CHOICES 
    426         while [ $n -lt $nr_of_nics ]; do 
    427                 typ[$n]="" 
    428                 if [ "${address[$n]}" = "$mac_extern" ]; then 
    429                         typ[$n]=extern 
    430                 elif [ "${address[$n]}" = "$mac_intern" ]; then 
    431                         typ[$n]=intern 
    432                 elif [ "${address[$n]}" = "$mac_wlan" ]; then 
    433                         typ[$n]=wlan 
    434                 elif [ "${address[$n]}" = "$mac_dmz" ]; then 
    435                         typ[$n]=dmz 
    436                 fi 
    437                 if [ -n "${typ[$n]}" ]; then 
    438                         menu[$n]="${model[$n]} ${address[$n]} ${typ[$n]}" 
    439                 else 
    440                         menu[$n]="${model[$n]} ${address[$n]}" 
    441                 fi 
    442                 if [ -n "$NIC_CHOICES" ]; then 
    443                         NIC_CHOICES="${NIC_CHOICES}, ${menu[$n]}" 
    444                 else 
    445                         NIC_CHOICES="${menu[$n]}" 
    446                 fi 
    447                 let n+=1 
    448         done 
    449         NIC_DEFAULT="${menu[0]}" 
    450         NIC_CHOICES="$NIC_CHOICES, , Fertig, , Abbrechen" 
     420 n=0 
     421 unset NIC_CHOICES 
     422 while [ $n -lt $nr_of_nics ]; do 
     423  menu[$n]="${iface[$n]} ${model[$n]} ${address[$n]}" 
     424  if [ -n "$NIC_CHOICES" ]; then 
     425   NIC_CHOICES="${NIC_CHOICES}, ${menu[$n]}" 
     426  else 
     427   NIC_CHOICES="${menu[$n]}" 
     428  fi 
     429  let n+=1 
     430 done 
     431 NIC_DEFAULT="${menu[0]}" 
     432 NIC_CHOICES="$NIC_CHOICES, , Abbrechen" 
    451433 
    452434} # create_nic_choices 
    453435 
    454436 
    455 create_if_choices() { 
    456  
    457         n=0 
    458         IF_CHOICES="extern,intern,wlan,dmz" 
    459         while [ $n -lt $nr_of_nics ]; do 
    460                 if [[ -n "${typ[$n]}" && "$CURTYP" != "${typ[$n]}" ]]; then 
    461                         IF_CHOICES=${IF_CHOICES/${typ[$n]}/} 
    462                         IF_CHOICES=${IF_CHOICES%,} 
    463                         IF_CHOICES=${IF_CHOICES#,} 
    464                         IF_CHOICES=${IF_CHOICES//,,/,} 
    465                 fi 
    466                 let n+=1 
    467         done 
    468         IF_CHOICES=${IF_CHOICES/extern/extern (ROT)} 
    469         IF_CHOICES=${IF_CHOICES/intern/intern (GRUEN)} 
    470         IF_CHOICES=${IF_CHOICES/wlan/wlan (BLAU)} 
    471         IF_CHOICES=${IF_CHOICES/dmz/dmz (ORANGE)} 
    472         IF_CHOICES=${IF_CHOICES//,/, } 
    473         IF_CHOICES="$IF_CHOICES, , keine Zuordnung" 
    474         IF_DEFAULT=`echo $IF_CHOICES | cut -f1 -d,` 
    475  
    476 } # create_if_choices 
    477  
    478 delete_mac() { 
    479  
    480         if [ "$CURMAC" = "$mac_extern" ]; then 
    481                 unset mac_extern 
    482                 db_set linuxmuster-base/mac_extern "" || true 
    483         elif [ "$CURMAC" = "$mac_intern" ]; then 
    484                 unset mac_intern 
    485                 db_set linuxmuster-base/mac_intern "" || true 
    486         elif [ "$CURMAC" = "$mac_wlan" ]; then 
    487                 unset mac_wlan 
    488                 db_set linuxmuster-base/mac_wlan "" || true 
    489         elif [ "$CURMAC" = "$mac_dmz" ]; then 
    490                 unset mac_dmz 
    491                 db_set linuxmuster-base/mac_dmz "" || true 
    492         fi 
    493  
    494 } # delete_mac 
    495  
    496 save_macs() { 
    497  
    498         db_set linuxmuster-base/mac_extern $mac_extern || true 
    499         db_set linuxmuster-base/mac_intern $mac_intern || true 
    500         db_set linuxmuster-base/mac_wlan $mac_wlan || true 
    501         db_set linuxmuster-base/mac_dmz $mac_dmz || true 
    502  
    503 } # write_settings 
    504  
    505437assign_nics() { 
    506438 
    507         # first fetch all nics and macs from the system 
    508         nr_of_nics=0 
    509         discover_nics 
    510  
    511         # no nic no fun 
    512         if [ $nr_of_nics -lt 1 ]; then 
    513                 echo " Sorry, no NIC found! Aborting!" 
    514                 exit 1 
    515         fi 
    516  
    517         # at least two nics required for integrated firewall 
    518         if [[ "$fwconfig" = "integrated" && $nr_of_nics -lt 2 ]]; then 
    519                 echo "Only one NIC found! You need at least 2!" 
    520                 echo "Aborting installation!" 
    521                 exit 1 
    522         fi 
    523  
    524         # internal interface is needed in both cases 
    525         db_get linuxmuster-base/mac_intern || true 
    526         mac_intern=$RET 
    527  
    528         # there is only one internal interface in case of dedicated firewall 
    529         if [ "$fwconfig" = "dedicated" ]; then 
    530  
    531                 db_set linuxmuster-base/mac_extern "" || true 
    532                 mac_extern="" 
    533                 db_set linuxmuster-base/mac_wlan "" || true 
    534                 mac_wlan="" 
    535                 db_set linuxmuster-base/mac_dmz "" || true 
    536                 mac_dmz="" 
    537                 # no questions necessary in this case 
    538                 if [ $nr_of_nics -eq 1 ]; then 
    539                         mac_intern=${address[0]} 
    540                         NIC_DESC="Es wurde eine Netzwerkkarte gefunden und dem internen Interface zugeordnet. \ 
    541                                   Waehlen Sie nun mit den Pfeiltasten den Menuepunkt <Fertig> an und starten Sie die \ 
    542                                   Serverkonfiguration mit ENTER." 
    543                 else 
    544                         NIC_DESC="Welche Netzwerkkarte ist mit dem internen Netz verbunden? \ 
    545                                   Waehlen Sie die entsprechende Karte mit den Pfeiltasten aus \ 
    546                                   Waehlen Sie anschließend mit den Pfeiltasten den Menuepunkt <Fertig> aus und \ 
    547                                   starten Sie die Serverkonfiguration mit ENTER." 
    548                 fi 
    549  
    550         else # all interface types to handle in case of integrated firewall 
    551  
    552                 db_get linuxmuster-base/mac_extern || true 
    553                 mac_extern=$RET 
    554                 db_get linuxmuster-base/mac_wlan || true 
    555                 mac_wlan=$RET 
    556                 db_get linuxmuster-base/mac_dmz || true 
    557                 mac_dmz=$RET 
    558  
    559                 NIC_DESC="Ordnen Sie die Netzwerkkarten den Interfaces extern, intern und ggf. wlan und dmz zu. \ 
    560                           Es muessen mindestens ein externes und ein internes Interface zugeordnet sein. \ 
    561                           Waehlen Sie mit den Pfeiltasten eine Netzwerkkarte fuer die Zuordnung aus. \ 
    562                           Bestaetigen Sie die Auswahl mit ENTER um ins naechste Menue zu gelangen. \ 
    563                           Beenden Sie die Zuordnung mit ueber den Menuepunkt <Fertig>." 
    564  
    565         fi 
    566  
    567         db_subst linuxmuster-base/nicmenu nic_desc $NIC_DESC 
    568  
    569         while true; do 
    570  
    571                 create_nic_choices 
    572                 db_fset linuxmuster-base/nicmenu seen false 
    573                 db_subst linuxmuster-base/nicmenu nic_choices $NIC_CHOICES 
    574  
    575                 unset choice 
    576                 while [ -z "$choice" ]; do 
    577                         db_set linuxmuster-base/nicmenu $NIC_DEFAULT || true 
    578                         db_input $PRIORITY linuxmuster-base/nicmenu || true 
    579                         db_go 
    580                         db_get linuxmuster-base/nicmenu || true 
    581                         choice="$RET" 
    582                 done 
    583  
    584                 [ "$choice" = "Abbrechen" ] && exit 1 
    585  
    586                 if [ "$choice" = "Fertig" ]; then 
    587                         [[ "$fwconfig" = "dedicated" &&  -n "$mac_intern" ]] && break 
    588                         [[ -n "$mac_extern" && -n "$mac_intern" ]] && break 
    589                         continue 
    590                 fi 
    591  
    592                 CURMAC=`echo "$choice" | cut -f2 -d" "` 
    593                 CURTYP=`echo "$choice" | cut -f3 -d" "` 
    594  
    595                 if [ "$fwconfig" = "integrated" ]; then 
    596                         create_if_choices 
    597                         db_fset linuxmuster-base/ifmenu seen false 
    598                         db_subst linuxmuster-base/ifmenu if_choices $IF_CHOICES 
    599                         db_subst linuxmuster-base/ifmenu if_desc $choice 
    600                         unset iftype 
    601                         while [ -z "$iftype" ]; do 
    602                                 db_set linuxmuster-base/ifmenu $IF_DEFAULT || true 
    603                                 db_input $PRIORITY linuxmuster-base/ifmenu || true 
    604                                 db_go 
    605                                 db_get linuxmuster-base/ifmenu || true 
    606                                 iftype=`echo "$RET" | cut -f1 -d" "` 
    607                         done 
    608                 else 
    609                         iftype=intern 
    610                 fi 
    611                 delete_mac 
    612  
    613                 case $iftype in 
    614  
    615                         extern) 
    616                                 mac_extern=$CURMAC 
    617                                 ;; 
    618  
    619                         intern) 
    620                                 mac_intern=$CURMAC 
    621                                 ;; 
    622  
    623                         wlan) 
    624                                 mac_wlan=$CURMAC 
    625                                 ;; 
    626  
    627                         dmz) 
    628                                 mac_dmz=$CURMAC 
    629                                 ;; 
    630  
    631                         *) 
    632                                 ;; 
    633  
    634                 esac 
    635  
    636         done 
    637  
    638         # unset not assigned interfaces 
    639         OIFS=$IFS 
    640         IFS=, 
    641         ifaces=`for i in $NIC_CHOICES; do echo $i | awk '{ print $3 }'; done` 
    642         IFS=$OIFS 
    643         stringinstring extern "$ifaces" || mac_extern="" 
    644         stringinstring wlan "$ifaces" || mac_wlan="" 
    645         stringinstring dmz "$ifaces" || mac_dmz="" 
    646  
    647         save_macs 
     439 # first fetch all nics and macs from the system 
     440 nr_of_nics=0 
     441 discover_nics 
     442 
     443 # no nic no fun 
     444 if [ $nr_of_nics -lt 1 ]; then 
     445  echo " Sorry, no NIC found! Aborting!" 
     446  exit 1 
     447 fi 
     448 
     449 # substitute nicmenu descritpion 
     450 NIC_DESC="Welche Netzwerkkarte ist mit dem internen Netz verbunden? \ 
     451           Waehlen Sie die entsprechende Karte mit den Pfeiltasten aus \ 
     452           und starten Sie dann die Serverkonfiguration mit ENTER." 
     453 db_subst linuxmuster-base/nicmenu nic_desc $NIC_DESC 
     454 
     455 # compute menu entries 
     456 create_nic_choices 
     457 
     458 # build menu 
     459 db_fset linuxmuster-base/nicmenu seen false 
     460 db_subst linuxmuster-base/nicmenu nic_choices $NIC_CHOICES 
     461 
     462 # menu input 
     463 db_set linuxmuster-base/nicmenu $NIC_DEFAULT || true 
     464 db_input $PRIORITY linuxmuster-base/nicmenu || true 
     465 db_go 
     466 db_get linuxmuster-base/nicmenu || true 
     467 iface_lan="$(echo "$RET" | awk '{ print $1 }')" 
     468 
     469 [ "$iface_lan" = "Abbrechen" ] && exit 1 
     470 
     471 db_set linuxmuster-base/iface_lan $iface_lan || true 
     472 db_go 
     473 
     474 # write iface to network.settings 
     475 if grep -q ^iface_lan $NETWORKSETTINGS; then 
     476  sed -e "s|^iface_lan=.*|iface_lan=$iface_lan|" -i $NETWORKSETTINGS 
     477 else 
     478  echo "iface_lan=$iface_lan" >> $NETWORKSETTINGS 
     479 fi 
    648480 
    649481} # assign_nics 
  • main/linuxmuster-base/branches/testing/share/scripts/linuxmuster-config

    r1210 r1230  
    195195 
    196196 
    197  
    198 # check whether rembo is available 
    199 rembo=`aptitude search myshn` 
    200 [ "$1" = "--first" ] && rembo="" 
    201  
    202197# imaging system 
    203198imaging="linbo" 
    204 if [ -n "$rembo" ]; then 
    205  
    206         IMG_CHOICES="linbo, rembo" 
    207         IMG_DESC="LINBO [linbo] und Rembo/mySHN (tm) [rembo]." 
    208  
    209 fi 
    210  
    211 if [ -n "$IMG_CHOICES" ]; then 
    212         db_fset linuxmuster-base/imaging seen false 
    213         db_subst linuxmuster-base/imaging img_choices $IMG_CHOICES 
    214         db_subst linuxmuster-base/imaging img_desc $IMG_DESC 
    215         db_input $PRIORITY linuxmuster-base/imaging || true 
    216         db_go 
    217         db_get linuxmuster-base/imaging || true 
    218         imaging=$RET 
    219 else 
    220         db_set linuxmuster-base/imaging "$imaging" || true 
    221 fi 
     199db_set linuxmuster-base/imaging "$imaging" || true 
    222200 
    223201 
  • main/linuxmuster-base/branches/testing/share/scripts/linuxmuster-patch

    • Property svn:keywords changed from Id to Id Revision
    r1207 r1230  
    22# config script for Linux-Musterloesung 
    33# 
    4 # Thomas Schmitt <schmitt@lmz-bw.de> 
     4# $Id$ 
    55# GPL-2 
    66 
     
    1616         internmask internmask_short internsubrange fwconfig externtype externip externmask \ 
    1717         gatewayip dnsforwarders smtprelay sambasid adminpw pgmadminpw wwwadminpw \ 
    18          ipcoppw workgroup mac_extern mac_intern mac_wlan mac_dmz imaging; do 
     18         ipcoppw workgroup iface_lan imaging; do 
    1919  RET=`echo get linuxmuster-base/$i | debconf-communicate` 
    2020  RET=${RET#[0-9] } 
     
    115115echo "basedn=\"$basedn\"" >> $NETWORKSETTINGS 
    116116echo "smtprelay=\"$smtprelay\"" >> $NETWORKSETTINGS 
    117 echo "mac_extern=$mac_extern" >> $NETWORKSETTINGS 
    118 echo "mac_intern=$mac_intern" >> $NETWORKSETTINGS 
    119 echo "mac_wlan=$mac_wlan" >> $NETWORKSETTINGS 
    120 echo "mac_dmz=$mac_dmz" >> $NETWORKSETTINGS 
     117echo "iface_lan=$iface_lan" >> $NETWORKSETTINGS 
    121118echo "imaging=$imaging" >> $NETWORKSETTINGS 
    122119chmod 755 $NETWORKSETTINGS 
    123  
    124 # define intern device 
    125 if [ "$fwconfig" = "integrated" ]; then 
    126  
    127   intern=br_intern 
    128  
    129   # activate password patch for integrated ipcop 
    130   ipcopintpw=$ipcoppw 
    131  
    132 else 
    133  
    134   intern=intern 
    135  
    136 fi 
    137120 
    138121# compute server's amount of ram 
     
    254237              s/@@cyradmpw@@/${cyradmpw}/g 
    255238              s/@@ipcoppw@@/${ipcopintpw}/g 
    256               s/@@adminmac@@/${mac_intern}/g 
    257239              s/@@sambasid@@/${sambasid}/g 
    258240              s/@@pgmadmin@@/${PGMADMIN}/g 
  • main/linuxmuster-base/branches/testing/share/scripts/nic_setup.sh

    • Property svn:keywords changed from Id to Id Revision
    r666 r1230  
    1 #!/bin/sh 
     1#!/bin/bash 
     2# assign specific nic to lan 
     3# $Id$ 
    24 
    35# Source debconf library. 
     
    1618db_title "$(getdistname) $DISTFULLVERSION" 
    1719 
    18 # read fwconfig from debconf 
    19 db_get linuxmuster-base/fwconfig || true 
    20 fwconfig=$RET 
    21 if [ -z "$fwconfig" ]; then 
    22         echo "Cannot determine firewall type. Aborting!" 
    23         exit 1 
    24 fi 
    25  
    26 # assign nics with extern, intern, wlan, dmz interfaces 
    2720assign_nics 
    2821 
     
    3023db_stop 
    3124 
    32 # write macs to network.settings 
    33 grep -v ^mac_ $NETWORKSETTINGS > $NETWORKSETTINGS.tmp 
    34 mv $NETWORKSETTINGS.tmp $NETWORKSETTINGS 
    35 echo "mac_extern=$mac_extern" >> $NETWORKSETTINGS 
    36 echo "mac_intern=$mac_intern" >> $NETWORKSETTINGS 
    37 echo "mac_wlan=$mac_wlan" >> $NETWORKSETTINGS 
    38 echo "mac_dmz=$mac_dmz" >> $NETWORKSETTINGS 
    39 chmod 755 $NETWORKSETTINGS 
  • main/linuxmuster-base/branches/testing/var/config-dynamic/00_stop-services/prepatch

    r1227 r1230  
    2020done 
    2121 
    22 # fix run directory 
    23 if [ ! -d /run/lock ]; then 
    24  echo "fix run directory" 
    25  ls -l /var/run >> $logfile 
    26  ls -l /var/lock >> $logfile 
    27  mkdir -p /run/lock 
    28  rm -rf /var/run 
    29  rm -rf /var/lock 
    30  ln -s /run /var/run 
    31  ln -s /run/lock /var/lock 
    32 fi 
    33  
  • main/linuxmuster-base/branches/testing/var/config-dynamic/01_network/postpatch

    r1223 r1230  
    33echo "### 01_network postpatch" 
    44 
    5 # delete interfaces template after patching 
    6 [ -e interfaces ] && rm interfaces 
    7  
    85# start networking 
    9 /etc/init.d/linuxmuster-nic-setup assign 
    106start networking 
    11 ifconfig intern up 
    12 route add default gw $ipcopip 
    137 
    148# set host and domain name 
  • main/linuxmuster-base/branches/testing/var/config-dynamic/01_network/prepatch

    r1223 r1230  
    44 
    55# stop networking at all 
    6 /etc/rcS.d/S40networking stop 1>> $LOGDIR/setup.log 2>> $LOGDIR/setup.log 
    7  
    8 # kill network devices if they are not down already 
    9 # first shutdown the interfaces 
    10 for i in `ifconfig -a | grep -i ethernet | sort -r | awk '{ print $1 }' -`; do 
    11         ifconfig $i down 1>> $LOGDIR/setup.log 2>> $LOGDIR/setup.log 
    12 done 
    13 # then delete the bridges 
    14 for i in `brctl show | grep ^br | grep -v ^bridge | awk '{ print $1 }' -`; do 
    15         brctl delbr $i 1>> $LOGDIR/setup.log 2>> $LOGDIR/setup.log 
    16 done 
    17  
    18 # wait for the devices to come down 
    19 sleep 3 
    20  
    21 # we don't need this 
    22 [ -e /etc/network/if-pre-up.d/uml-utilities ] && chmod 644 /etc/network/if-pre-up.d/uml-utilities 
     6stop networking 
    237 
    248# write servername to /etc/hostname 
     
    2812# patch linuxmuster-base defaults 
    2913backup_file /etc/default/linuxmuster-base 
    30 sed -e "s/^IFACE=.*/IFACE=$intern/" -i /etc/default/linuxmuster-base 
     14sed -e "s/^IFACE=.*/IFACE=$iface_lan/" -i /etc/default/linuxmuster-base 
    3115 
    3216if [[ "$1" = "--first" || "$update_fw" = "yes" ]]; then 
     
    3418        # start internal firewall on boot 
    3519        [ "$1" = "--first" ] && sed -e "s/^START_LINUXMUSTER=.*/START_LINUXMUSTER=yes/" -i /etc/default/linuxmuster-base 
    36  
    37         # copy interfaces template according to fwconfig 
    38         cp -f interfaces.$fwconfig interfaces 
    3920 
    4021else 
     
    5031                s/broadcast ${broadcast_old}.*/broadcast $broadcast/g 
    5132                s/gateway ${ipcopip_old}.*/gateway $ipcopip/g 
    52                 s/dns-nameservers ${serverip_old}.*/dns-nameservers $serverip/g 
    53                 s/dns-search ${domainname_old}.*/dns-search $domainname/g" -i /etc/network/interfaces 
    5433 
    5534        # prevent /etc/hosts from being patched 
  • main/linuxmuster-base/branches/testing/var/config-dynamic/03_dhcp3-server/postpatch

    r1223 r1230  
    55# patch internal interface 
    66[ "$1" = "--modfify" ] && backup_file /etc/isc-dhcp-server 
    7 sed -e "s/^INTERFACES=.*/INTERFACES=\"$intern\"/" -i /etc/default/isc-dhcp-server 
     7sed -e "s/^INTERFACES=.*/INTERFACES=\"$iface_lan\"/" -i /etc/default/isc-dhcp-server 
    88 
    99# simply start the service 
  • main/linuxmuster-base/branches/testing/var/config-static/etc/postgresql/9.1/main/pg_hba.conf

    r1212 r1230  
    1 # installed by linuxmuster-setup 
    2 # 17.10.2008 
     1# $Id$ 
    32# 
    43# PostgreSQL Client Authentication Configuration File 
    54# =================================================== 
    65# 
    7 # Refer to the PostgreSQL Administrator's Guide, chapter "Client 
    8 # Authentication" for a complete description.  A short synopsis 
    9 # follows. 
     6# Refer to the "Client Authentication" section in the PostgreSQL 
     7# documentation for a complete description of this file.  A short 
     8# synopsis follows. 
    109# 
    1110# This file controls: which hosts are allowed to connect, how clients 
    1211# are authenticated, which PostgreSQL user names they can use, which 
    13 # databases they can access.  Records take one of seven forms: 
     12# databases they can access.  Records take one of these forms: 
    1413# 
    15 # local      DATABASE  USER  METHOD  [OPTION] 
    16 # host       DATABASE  USER  IP-ADDRESS  IP-MASK   METHOD  [OPTION] 
    17 # hostssl    DATABASE  USER  IP-ADDRESS  IP-MASK   METHOD  [OPTION] 
    18 # hostnossl  DATABASE  USER  IP-ADDRESS  IP-MASK   METHOD  [OPTION] 
    19 # host       DATABASE  USER  IP-ADDRESS/CIDR-MASK  METHOD  [OPTION] 
    20 # hostssl    DATABASE  USER  IP-ADDRESS/CIDR-MASK  METHOD  [OPTION] 
    21 # hostnossl  DATABASE  USER  IP-ADDRESS/CIDR-MASK  METHOD  [OPTION] 
     14# local      DATABASE  USER  METHOD  [OPTIONS] 
     15# host       DATABASE  USER  ADDRESS  METHOD  [OPTIONS] 
     16# hostssl    DATABASE  USER  ADDRESS  METHOD  [OPTIONS] 
     17# hostnossl  DATABASE  USER  ADDRESS  METHOD  [OPTIONS] 
    2218# 
    23 # (The uppercase quantities should be replaced by actual values.) 
    24 # The first field is the connection type: "local" is a Unix-domain socket, 
    25 # "host" is either a plain or SSL-encrypted TCP/IP socket, "hostssl" is an 
    26 # SSL-encrypted TCP/IP socket, and "hostnossl" is a plain TCP/IP socket. 
    27 # DATABASE can be "all", "sameuser", "samegroup", a database name (or 
    28 # a comma-separated list thereof), or a file name prefixed with "@". 
    29 # USER can be "all", an actual user name or a group name prefixed with 
    30 # "+", an include file prefixed with "@" or a list containing either. 
    31 # IP-ADDRESS and IP-MASK specify the set of hosts the record matches. 
    32 # CIDR-MASK is an integer between 0 and 32 (IPv6) or 128(IPv6) 
    33 # inclusive, that specifies the number of significant bits in the 
    34 # mask, so an IPv4 CIDR-MASK of 8 is equivalent to an IP-MASK of 
    35 # 255.0.0.0, and an IPv6 CIDR-MASK of 64 is equivalent to an IP-MASK 
    36 # of ffff:ffff:ffff:ffff::. METHOD can be "trust", "reject", "md5", 
    37 # "crypt", "password", "krb5", "ident", or "pam".  Note that 
    38 # "password" uses clear-text passwords; "md5" is preferred for 
    39 # encrypted passwords.  OPTION is the ident map or the name of the PAM 
    40 # service. 
     19# (The uppercase items must be replaced by actual values.) 
    4120# 
    42 # INCLUDE FILES: 
    43 # If you use include files for users and/or databases (see PostgreSQL 
    44 # documentation, section 19.1), these files must be placed in the 
    45 # database directory. Usually this is /var/lib/postgres/data/, but 
    46 # that can be changed in /etc/postgresql/postmaster.conf with the 
    47 # POSTGRES_DATA variable. Putting them in /etc/postgresql/ will NOT 
    48 # work since the configuration files are only symlinked from 
    49 # POSTGRES_DATA. 
     21# The first field is the connection type: "local" is a Unix-domain 
     22# socket, "host" is either a plain or SSL-encrypted TCP/IP socket, 
     23# "hostssl" is an SSL-encrypted TCP/IP socket, and "hostnossl" is a 
     24# plain TCP/IP socket. 
     25# 
     26# DATABASE can be "all", "sameuser", "samerole", "replication", a 
     27# database name, or a comma-separated list thereof. The "all" 
     28# keyword does not match "replication". Access to replication 
     29# must be enabled in a separate record (see example below). 
     30# 
     31# USER can be "all", a user name, a group name prefixed with "+", or a 
     32# comma-separated list thereof.  In both the DATABASE and USER fields 
     33# you can also write a file name prefixed with "@" to include names 
     34# from a separate file. 
     35# 
     36# ADDRESS specifies the set of hosts the record matches.  It can be a 
     37# host name, or it is made up of an IP address and a CIDR mask that is 
     38# an integer (between 0 and 32 (IPv4) or 128 (IPv6) inclusive) that 
     39# specifies the number of significant bits in the mask.  A host name 
     40# that starts with a dot (.) matches a suffix of the actual host name. 
     41# Alternatively, you can write an IP address and netmask in separate 
     42# columns to specify the set of hosts.  Instead of a CIDR-address, you 
     43# can write "samehost" to match any of the server's own IP addresses, 
     44# or "samenet" to match any address in any subnet that the server is 
     45# directly connected to. 
     46# 
     47# METHOD can be "trust", "reject", "md5", "password", "gss", "sspi", 
     48# "krb5", "ident", "peer", "pam", "ldap", "radius" or "cert".  Note that 
     49# "password" sends passwords in clear text; "md5" is preferred since 
     50# it sends encrypted passwords. 
     51# 
     52# OPTIONS are a set of options for the authentication in the format 
     53# NAME=VALUE.  The available options depend on the different 
     54# authentication methods -- refer to the "Client Authentication" 
     55# section in the documentation for a list of which options are 
     56# available for which authentication methods. 
     57# 
     58# Database and user names containing spaces, commas, quotes and other 
     59# special characters must be quoted.  Quoting one of the keywords 
     60# "all", "sameuser", "samerole" or "replication" makes the name lose 
     61# its special character, and just match a database or username with 
     62# that name. 
    5063# 
    5164# This file is read on server startup and when the postmaster receives 
    5265# a SIGHUP signal.  If you edit the file on a running system, you have 
    53 # to SIGHUP the postmaster for the changes to take effect, or use 
    54 # "pg_ctl reload". 
    55 # 
    56 # Upstream default configuration 
    57 # 
    58 # The following configuration is the upstream default, which allows 
    59 # unrestricted access to amy database by any user on the local machine. 
    60 #  
    61 # TYPE  DATABASE    USER        IP-ADDRESS        IP-MASK           METHOD 
    62 # 
    63 #local   all         all                                             trust 
    64 # IPv4-style local connections: 
    65 #host    all         all         127.0.0.1         255.255.255.255   trust 
    66 # IPv6-style local connections: 
    67 # 
     66# to SIGHUP the postmaster for the changes to take effect.  You can 
     67# use "pg_ctl reload" to do that. 
     68 
    6869# Put your actual configuration here 
    6970# ---------------------------------- 
    7071# 
    71 # This default configuration allows any local user to connect as himself 
    72 # without a password, either through a Unix socket or through TCP/IP; users 
    73 # on other machines are denied access. 
     72# If you want to allow non-local connections, you need to add more 
     73# "host" records.  In that case you will also need to make PostgreSQL 
     74# listen on a non-local interface via the listen_addresses 
     75# configuration parameter, or via the -i or -h command line switches. 
     76 
     77 
     78 
     79 
     80# DO NOT DISABLE! 
     81# If you change this first entry you will need to make sure that the 
     82# database superuser can access the database using some other method. 
     83# Noninteractive access to all databases is required during automatic 
     84# maintenance (custom daily cronjobs, replication, and similar tasks). 
    7485# 
    75 # If you want to allow non-local connections, you need to add more 
    76 # "host" records before the final line that rejects all TCP/IP connections. 
    77 # Also, remember TCP/IP connections are only enabled if you enable 
    78 # "tcpip_socket" in /etc/postgresql/postgresql.conf. 
    79 # 
    80 # DO NOT DISABLE! 
    81 # If you change this first entry you will need to make sure the postgres user 
    82 # can access the database using some other method.  The postgres user needs 
    83 # non-interactive access to all databases during automatic maintenance 
    84 # (see the vacuum command and the /usr/lib/postgresql/bin/do.maintenance 
    85 # script). 
    86 # 
    87 # TYPE  DATABASE    USER        IP-ADDRESS        IP-MASK           METHOD 
    88 # Database administrative login by UNIX sockets 
    89 local   all        postgres         ident 
    90 local   all        ldap             ident 
    91 local   all        postgres         ident 
    92 # 
    93 # All other connections by UNIX sockets 
    94 local   template1        ldap         password                   
    95 local   ldap             ldap         password 
    96 local   template1        moodle       password                   
    97 local   moodle           moodle       password 
    98 # 
    99 # All IPv4 connections from localhost 
    100 host   template1        ldap         127.0.0.1      255.255.255.255      password       
    101 host   template1        moodle       127.0.0.1      255.255.255.255      password       
    102 host   ldap             ldap         127.0.0.1      255.255.255.255      password       
    103 host   moodle           moodle       127.0.0.1      255.255.255.255      password 
    104 # 
    105 # All IPv6 localhost connections 
    106 host    all         all         ::1               ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff        ident 
    107 host    all         all         ::ffff:127.0.0.1/128                ident 
    108 # 
    109 # reject all other connection attempts 
    110 host    all         all         0.0.0.0           0.0.0.0           reject 
    11186 
     87# paedml 
     88local   ldap            postgres        ident                   map=postgres 
     89local   template1       postgres        ident                   map=postgres 
     90 
     91# Database administrative login by Unix domain socket 
     92local   all             postgres                                peer 
     93 
     94# TYPE  DATABASE        USER            ADDRESS                 METHOD 
     95 
     96# paedml 
     97local   ldap            ldap            ident                   map=ldap 
     98 
     99# "local" is for Unix domain socket connections only 
     100local   all             all                                     peer 
     101 
     102# IPv4 local connections: 
     103host    all             all             127.0.0.1/32            md5 
     104# IPv6 local connections: 
     105#host    all             all             ::1/128                 md5 
     106# Allow replication connections from localhost, by a user with the 
     107# replication privilege. 
     108#local   replication     postgres                                peer 
     109#host    replication     postgres        127.0.0.1/32            md5 
     110#host    replication     postgres        ::1/128                 md5 
     111 
Note: See TracChangeset for help on using the changeset viewer.