diff options
Diffstat (limited to 'initrd/initrd-stuff/bin/servconfig')
-rwxr-xr-x | initrd/initrd-stuff/bin/servconfig | 60 |
1 files changed, 13 insertions, 47 deletions
diff --git a/initrd/initrd-stuff/bin/servconfig b/initrd/initrd-stuff/bin/servconfig index 42b1be77..f27c4055 100755 --- a/initrd/initrd-stuff/bin/servconfig +++ b/initrd/initrd-stuff/bin/servconfig @@ -4,8 +4,10 @@ # for linux diskless clients (executed within initial # ramdisk) # -# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 01-06-2006 -# Michael Janczyk, 31-05-2006 +# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 23-06-2006 +# Michael Janczyk, 31-05-2006 +# Lars Mueller, 23-06-2006 +# Oliver Tappe, 23-06-2006 # # Copyright: (c) 2006 - RZ Universitaet Freiburg # @@ -59,10 +61,14 @@ echo " # from dhcp, ldap ... # wait for the appearance of configuration via dhcp # do not wait if dhcp is not used (how?) -waitfor /tmp/dhcp-done 10000 || error " Did not get any configuration \ -data via dhcp until now ..." nonfatal -waitfor /tmp/ldap-done 10000 || error " Did not get any configuration \ -data via dhcp until now ..." nonfatal +waitfor /tmp/dhcp-done 10000 || error "$scfg_errdcfg" nonfatal +waitfor /tmp/file-done 10000 || error "$scfg_errfcfg" nonfatal +waitfor /tmp/ldap-done 10000 || error "$scfg_errlcfg" nonfatal +# concat the different files now into the central config file, order +# matters - ldap data has highest priority +for config in /tmp/confviadhcp /tmp/confviafile /tmp/confvialdap + do test -f $config && cat $config >> /etc/machine-setup +done . /etc/machine-setup # hack for replacing variables ($serverip, $clientip, $host_name) in # machine-setup @@ -128,47 +134,7 @@ test -n "$domain_name_servers" && { # initial boot scripts # delete and create runlevel links for initial booting (SuSE, Debian, # ...) -case ${DISTRO} in - suse*|debian*|ubuntu*) - for i in ${D_RCDIRS} ${D_INITBOOTD} ; do - rm -f /mnt/etc/$i/* - done - count=10 - # boot.ld is a special runlevel script generated within initial ramdisk - # which should be executed before the rest - for i in boot.ld ${D_INITSCRIPTS}; do - count=`expr $count + 1` - revcnt=`expr 41 - $count` - ln -sf /etc${D_INITDIR}/$i /mnt/etc/${D_INITBOOTD}/S${count}$i - ln -sf /etc${D_INITDIR}/$i /mnt/etc/${D_INITBOOTD}/K${revcnt}$i - done - ;; - gentoo*) - # rather different runlevel concept - rm /mnt/etc/runlevels/*/.critical 2>/dev/null - for i in ${D_INITSCRIPTS}; do - ln -sf /etc${D_INITDIR}/$i /mnt/etc/${D_INITBOOTD}/$i - echo $i >> /mnt/etc/${D_INITBOOTD}/.critical - echo $i >> /mnt/etc/runlevels/default/.critical - done - -# ( for i in /mnt/etc/init.d/*; do -# strinstr ".sh" "$i" && continue -# script=${i#/mnt/etc/init.d/*} -# if ! strinstr "$script " "${D_INITSCRIPTS} " ; then -# for j in /mnt/etc/init.d/*; do -# strinstr ".sh" "$j" && continue -# link=${j#/mnt/etc/init.d/*} -# if ! strinstr "$script" "$link" ; then -# sed "/depend/,/}/s/$script //;/depend/,/}/s/$script$//" \ -# /mnt/etc/init.d/$link > /tmp/rlvscript -# cp /tmp/rlvscript /mnt/etc/init.d/$link -# fi -# done -# fi -# done ) & - ;; -esac +initial_boot ####################################################################### # |