diff options
author | Dirk von Suchodoletz | 2006-06-26 10:40:07 +0200 |
---|---|---|
committer | Dirk von Suchodoletz | 2006-06-26 10:40:07 +0200 |
commit | c3443dcaeb85cf64987089607dc5a89517ceb74f (patch) | |
tree | 540e7aa9b8606983990f4171aefeb00efe053dbd | |
parent | Added descriptions, some cleanups, ... (diff) | |
download | core-c3443dcaeb85cf64987089607dc5a89517ceb74f.tar.gz core-c3443dcaeb85cf64987089607dc5a89517ceb74f.tar.xz core-c3443dcaeb85cf64987089607dc5a89517ceb74f.zip |
Should fix a timing issue, which prevented hwautocfg to see the
completed machine-setup ...
git-svn-id: http://svn.openslx.org/svn/openslx/ld4@251 95ad53e4-c205-0410-b2fa-d234c58c8868
-rwxr-xr-x | initrd/initrd-stuff/bin/hwautocfg | 8 | ||||
-rwxr-xr-x | initrd/initrd-stuff/bin/servconfig | 15 | ||||
-rw-r--r-- | initrd/initrd-stuff/etc/functions | 16 | ||||
-rw-r--r-- | initrd/initrd-stuff/etc/messages | 9 | ||||
-rwxr-xr-x | initrd/mkdxsinitrd | 5 |
5 files changed, 30 insertions, 23 deletions
diff --git a/initrd/initrd-stuff/bin/hwautocfg b/initrd/initrd-stuff/bin/hwautocfg index 459a4174..0dd99e8a 100755 --- a/initrd/initrd-stuff/bin/hwautocfg +++ b/initrd/initrd-stuff/bin/hwautocfg @@ -4,10 +4,11 @@ # script for linux diskless clients, using hwconfig from # knoppix as base tool # -# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 01-05-2006 +# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 26-06-2006 # Felix Endres # # Copyright: (c) 2003 - 2006 - RZ Universitaet Freiburg +# (c) 2006 - odlx.org project # # Version: 0.3.2b @@ -399,10 +400,7 @@ fi # configure some variables from configuration file - wait for dhcp or ldap # confiurator to complete -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 ldap until now ..." nonfatal +cfgcomplete . /etc/machine-setup # postpone some commands into normal bootup environment diff --git a/initrd/initrd-stuff/bin/servconfig b/initrd/initrd-stuff/bin/servconfig index 5dc1f3ff..d5580267 100755 --- a/initrd/initrd-stuff/bin/servconfig +++ b/initrd/initrd-stuff/bin/servconfig @@ -4,7 +4,7 @@ # for linux diskless clients (executed within initial # ramdisk) # -# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 23-06-2006 +# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 26-06-2006 # Michael Janczyk, 31-05-2006 # Lars Mueller, 23-06-2006 # Oliver Tappe, 23-06-2006 @@ -60,17 +60,10 @@ echo " ####################################################################### # read and unify configuration options - default configuration file, # 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 "$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 +# wait for the appearance of configuration from several sources +cfgcomplete . /etc/machine-setup + # hack for replacing variables ($serverip, $clientip, $host_name) in # machine-setup sed -e "s/\$serverip/$serverip/;s/\$clientip/$clientip/" \ diff --git a/initrd/initrd-stuff/etc/functions b/initrd/initrd-stuff/etc/functions index 351a4c6f..7ae7b7e0 100644 --- a/initrd/initrd-stuff/etc/functions +++ b/initrd/initrd-stuff/etc/functions @@ -2,7 +2,7 @@ # linux diskless clients (included by init, hwautocfg, # servconfig, ... within initial ramdisk) # -# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 23-06-2006 +# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 26-06-2006 # Felix Endres, 30-04-2006 # Tobias Maier # @@ -420,6 +420,20 @@ sed 's/:.*/:!:13078:0:99999:7:::/;/^root.*/d' /tmp/newpasswd \ } ####################################################################### +# wait for the completion of configuration file (machine-setup). It is +# composed from different sources +cfgcomplete () { +waitfor /tmp/dhcp-done 10000 || error "$error_errdcfg" nonfatal +waitfor /tmp/file-done 10000 || error "$error_errfcfg" nonfatal +waitfor /tmp/ldap-done 10000 || error "$error_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 +} + +####################################################################### # localization simply derived from $language variable set in # machine-setup or other sources - mostly taken from knoppix localization () { diff --git a/initrd/initrd-stuff/etc/messages b/initrd/initrd-stuff/etc/messages index 9876a208..b9c4e155 100644 --- a/initrd/initrd-stuff/etc/messages +++ b/initrd/initrd-stuff/etc/messages @@ -3,7 +3,7 @@ # diskless clients of version 4 # this file could be used for localization of error messages # -# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 24-06-2006 +# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 26-06-2006 # # Copyright: (c) 2006 - RZ Universitaet Freiburg # (c) 2006 - odlx.org project @@ -113,6 +113,10 @@ error_pump=" Config via pump not implemented yet.\n$error_dhcp" error_ipconf=" Config via ipconfig (from klibc) not implemented yet.\n\ $error_dhcp" error_ldapcfg=" The configuration via ldap is not implemented yet." +error_errdcfg=" Did not get any configuration data via dhcp until now ..." +error_errfcfg=" Did not get any configuration data via tftp until now ..." +error_errlcfg=" Did not get any configuration data via ldap until now ..." + # messages from distro functions df_errumod=" Failed to load the \"unix\" module. Problems with Hardware \ @@ -133,9 +137,6 @@ df_errnsc=" Name Service caching deamon $df_errserv\n This service might \ be useful to take load from a ldap user directory." # messages from servconfig -scfg_errdcfg=" Did not get any configuration data via dhcp until now ..." -scfg_errfcfg=" Did not get any configuration data via tftp until now ..." -scfg_errlcfg=" Did not get any configuration data via ldap until now ..." scfg_nfs=" Mount of some NFS source failed ..." scfg_ntptz=" No such timezone data file (needed for ntp time service \ configuration)." diff --git a/initrd/mkdxsinitrd b/initrd/mkdxsinitrd index 804b2bc2..40f05553 100755 --- a/initrd/mkdxsinitrd +++ b/initrd/mkdxsinitrd @@ -350,7 +350,7 @@ case "${DISTRO}" in esac ;; esac -# ast this point ${DISTRO} ${DISTRO_VER} should be fixed +# at this point ${DISTRO} ${DISTRO_VER} should be fixed copy_distro_stuff ${DISTRO} ${DISTRO_VER} # hotplug/udev type and related stuff @@ -419,7 +419,8 @@ fi # type of hotplug/udev/dev (for etc directories see above!!) for bbins in udev udevd udevstart udevtrigger udevsend do - cobi ${bbins} bin &>/dev/null || echo "Program ${bbins} not found" + cobi ${bbins} bin &>/dev/null || \ + echo "Program ${bbins} not found; could be most probably ignored" done # if nfs is used as clients root filesystem |