From d95a0df9a241f33375c23cde74c3b7c889612cc2 Mon Sep 17 00:00:00 2001 From: Dirk von Suchodoletz Date: Sun, 2 Apr 2006 15:25:32 +0000 Subject: completed relocations of messages to specific file for init, functions and suse-functions ... git-svn-id: http://svn.openslx.org/svn/openslx/ld4@142 95ad53e4-c205-0410-b2fa-d234c58c8868 --- initrd/distro-specs/gentoo/functions-2005.1 | 12 ++-- initrd/distro-specs/suse/functions-9.3 | 11 ++-- initrd/initrd-stuff/etc/functions | 32 +++++----- initrd/initrd-stuff/etc/messages | 71 ++++++++++++++++++--- initrd/initrd-stuff/init | 95 ++++++++--------------------- 5 files changed, 116 insertions(+), 105 deletions(-) (limited to 'initrd') diff --git a/initrd/distro-specs/gentoo/functions-2005.1 b/initrd/distro-specs/gentoo/functions-2005.1 index 9416607f..85e141ae 100644 --- a/initrd/distro-specs/gentoo/functions-2005.1 +++ b/initrd/distro-specs/gentoo/functions-2005.1 @@ -37,7 +37,7 @@ if [ -x /bin/udevd ] ; then export UDEVD_EVENT_TIMEOUT=1 echo "" > /proc/sys/kernel/hotplug udevd & -else error $df_errudev nonfatal +else error "$df_errudev" nonfatal fi } @@ -115,7 +115,7 @@ if [ "x$start_cron" = "xyes" ] ; then if [ -f /mnt/etc/${D_INITDIR}/cron ] ; then : else - error $df_errcron nonfatal + error "$df_errcron" nonfatal fi fi } @@ -126,7 +126,7 @@ if [ "x$start_syslog" = "xyes" ] ; then if [ -f /mnt/etc/${D_INITDIR}/syslog-ng ] ; then rllinker syslog-ng else - error $df_errsysl nonfatal + error "$df_errsysl" nonfatal fi fi } @@ -137,7 +137,7 @@ if [ "x$start_sshd" = "xyes" ] ; then if [ -f /mnt/etc/${D_INITDIR}/sshd ] ; then rllinker "sshd" else - error $df_errsshd nonfatal + error "$df_errsshd" nonfatal fi fi } @@ -228,7 +228,7 @@ if [ -f /mnt/etc/${D_INITDIR}/autofs ] ; then if [ -n "${automnt_src}" ] ; then # local directory and home directory server from machine-setup [ -z "${automnt_dir}" ] && automnt_dir="/home" - strinstr "/" "${automnt_dir}" && error $df_erratpld nonfatal + strinstr "/" "${automnt_dir}" && error "$df_erratpld" nonfatal automnt_dir=${automnt_dir#/} echo -e "/home\t/etc/auto.${automnt_dir}\n" >> /mnt/etc/auto.master echo -e "# /etc/auto.${automnt_dir} created by $0:\n" \ @@ -238,7 +238,7 @@ if [ -f /mnt/etc/${D_INITDIR}/autofs ] ; then config_portmap fi else - error $df_erramnt nonfatal + error "$df_erramnt" nonfatal fi } diff --git a/initrd/distro-specs/suse/functions-9.3 b/initrd/distro-specs/suse/functions-9.3 index 53270443..7e2c83fd 100644 --- a/initrd/distro-specs/suse/functions-9.3 +++ b/initrd/distro-specs/suse/functions-9.3 @@ -44,8 +44,7 @@ echo -e "DXS VERSION = 4.0a\nINITRAMFS GENERATION DATE = $date" \ # udev/hotplug - auto device discovery service udev_hotplug () { local result=0 -[ -d /etc/hotplug -a -d /etc/hotplug.d ] || error " Hotplug subdirectory \ -is missing! udev(d) might not work as expected." nonfatal +[ -d /etc/hotplug -a -d /etc/hotplug.d ] || error "$df_errhotpl" nonfatal echo "Enabling hotplug/udev" udevstart || result=1 udevd -d || result=1 @@ -107,7 +106,7 @@ if [ "x$start_cron" = "xyes" ] ; then \nMAILTO=\n-*/15 * * * *\troot\ttest -x /usr/lib/cron/run-crons && \ /usr/lib/cron/run-crons >/dev/null 2>&1\n" >/mnt/etc/crontab else - error $df_errcron nonfatal + error "$df_errcron" nonfatal fi fi } @@ -125,7 +124,7 @@ if [ "x$start_syslog" = "xyes" ] ; then cp /etc/syslog-ng.conf /mnt/etc/syslog-ng/syslog-ng.conf rllinker syslog "02" "20" else - error $df_errsysl nonfatal + error "$df_errsysl" nonfatal fi fi } @@ -138,7 +137,7 @@ if [ "x$start_sshd" = "xyes" ] ; then testmkd /mnt/var/lib/empty rllinker "sshd" "12" "10" else - error $df_errsshd nonfatal + error "$df_errsshd" nonfatal fi fi } @@ -380,7 +379,7 @@ if [ -f /mnt/etc/${D_SYSCONFDIR}/autofs ] ; then if [ -n "${automnt_src}" ] ; then # local directory and home directory server from machine-setup [ -z "${automnt_dir}" ] && automnt_dir="/home" - strinstr "/" "${automnt_dir}" && error $df_erratpld nonfatal + strinstr "/" "${automnt_dir}" && error "$df_erratpld" nonfatal automnt_dir=${automnt_dir#/} echo -e "/home\t/etc/auto.${automnt_dir}\n" >> /mnt/etc/auto.master echo -e "# /etc/auto.${automnt_dir} created by $0:\n" \ diff --git a/initrd/initrd-stuff/etc/functions b/initrd/initrd-stuff/etc/functions index 19644cf5..a83f2fe0 100644 --- a/initrd/initrd-stuff/etc/functions +++ b/initrd/initrd-stuff/etc/functions @@ -50,12 +50,12 @@ else LOGFILE="/dev/null" fi # if nonfatal error else fatal error message and shell if [ -n "$2" ] ; then - [ "$DEBUGLEVEL" -ge 1 ] && echo -e "$error_msg $e_msg $error_nfe" \ + [ "$DEBUGLEVEL" -ge 1 ] && echo -e "${error_msg}${e_msg}${error_nfe}" \ >> ${LOGFILE} - [ "$DEBUGLEVEL" -gt 1 ] && echo -e "$error_msg $e_msg $error_nfe" + [ "$DEBUGLEVEL" -gt 1 ] && echo -e "${error_msg}${e_msg}${error_nfe}" [ "$DEBUGLEVEL" -gt 2 ] && usleep 20 else - echo -e "$error_msg $e_msg $error_shell" + echo -e "${error_msg}${e_msg}${error_shell}" /bin/sh fi } @@ -134,7 +134,7 @@ case $ipcfg in fi ;; none) - error $error_iptool + error "$error_iptool" ;; esac } @@ -147,18 +147,18 @@ for mnt in nfsmount mount none; do test -x /bin/$mnt && break; done [ -f /lib/modules/@@@KERNVER@@@/kernel/fs/nfs/nfs.ko ] && \ - loadmod /lib/modules/@@@KERNVER@@@/kernel/fs/nfs/nfs.ko $error_modnfs + loadmod /lib/modules/@@@KERNVER@@@/kernel/fs/nfs/nfs.ko "$error_modnfs" case $mnt in nfsmount) - nfsmount -o ro $nfsroot /mnt || error $error_nfs + nfsmount -o ro $nfsroot /mnt || error "$error_nfs" ;; mount) - portmap || error $error_portm - mount -n -t nfs -o ro $nfsroot /mnt || error $errmsg + portmap || error "$error_portm" + mount -n -t nfs -o ro $nfsroot /mnt || error "$errmsg" killall -9 portmap ;; none) - error $error_mntt + error "$error_mntt" ;; esac } @@ -200,9 +200,7 @@ for dhcp in dhclient dhcpcd pump ipconfig none; do test -x /bin/$dhcp && break; done if [ "$dhcp" = "none" ] ; then - error " You tried to configure system via dhcp, but no usable dhcp\n\ - client could be found. Please check that you have some client from\n\ - the following list installed: dhclient dhcpcd pump ipconfig." nonfatal + error "$error_nodhcp" nonfatal else # ensure the interface is up ipsetup 0.0.0.0 255.255.255.255 0.0.0.0 255.255.255.255 eth0 & @@ -218,18 +216,18 @@ case $dhcp in mkdhclconf $vci ln -s /bin/dhcpmkconfig /bin/dhclient-script dhclient -q -cf /etc/dhclient.conf -lf /var/lib/dhcp/dhclient.leases eth0 \ - 2>&1 >/dev/null || error $error_dhclient + 2>&1 >/dev/null || error "$error_dhclient" ;; dhcpcd) ln -s /bin/dhcpmkconfig /bin/dhcpcd.exe dhcpcd -L /var/lib/dhcp -c /bin/dhcpcd.exe -T -t 30 eth0 2>&1 >/dev/null \ - || error $error_dhcpcd + || error "$error_dhcpcd" ;; pump) - error $error_pump + error "$error_pump" ;; ipconfig) - error $error_ipconf + error "$error_ipconf" ;; *) ;; @@ -355,7 +353,7 @@ echo "finished" > /tmp/ldcfg # configuration via ldap ldapconf () { local ldapserver=$1 -error $error_ldapcfg +error "$error_ldapcfg" echo "not implemented" > /tmp/ldap-done } diff --git a/initrd/initrd-stuff/etc/messages b/initrd/initrd-stuff/etc/messages index 99bbe060..416caa81 100644 --- a/initrd/initrd-stuff/etc/messages +++ b/initrd/initrd-stuff/etc/messages @@ -1,12 +1,13 @@ # Description: messages file for all error and info messages generated during # bootup (within initialramfs) for linux diskless clients -# version 4 +# version 4 +# this file could be used for localization of error messages # -# Author(s): Dirk von Suchodoletz , 01-04-2006 +# Author(s): Dirk von Suchodoletz , 02-04-2006 # # Copyright: (c) 2006 - RZ Universitaet Freiburg # -# Version: 0.0.3a +# Version: 0.0.3b # messages from init init_errmsg="functions file contains a lot of script \ @@ -14,9 +15,6 @@ functionality. Without this\ninit script will not run." init_mff="The main $init_errmsg" init_dff="The distro $init_errmsg" init_dscf="The distribution specific configuration file could not be found" -init_errnbd=" Failed to load \ -module ${NBD}.ko. It is needed if you intend to use\n network block \ -device (D)NBD for the client as root filesystem." init_errip=" Unable to setup at \ least basic functionality, because no IP configuration\n available. You \ might pass that information via kernel command line\n through setting of \ @@ -29,11 +27,63 @@ with dhcp!" init_errnwad=" Failed to load the network \ adaptor modules defined via mkdxsinitrd\n run. Please rerun and list the \ appropriate modules (without .ko)." +init_errdhcp=" Did not get complete IP \ +configuration via DHCP. You may want to add\n a vendor code identifier \ +via kernel commandline (vci=VCI)." +init_errnbd=" Failed to load \ +module ${NBD}.ko. It is needed if you intend to use\n network block \ +device (D)NBD for the client as root filesystem." +init_nbdcl=" Failed to start \ +the network block device client. Unable to mount root\n filesystem." +init_nbddev=" For some reason the network block device /dev/${NBD}0 never \ +appeared.\n You might want to check udev or your list of static device \ +files." +init_moddir=" The requested modules directory does not exist. That could \ +mean:\n * The kernel was updated but mkdxsinitrd was not run afterwards.\n\ + * The mounted filesystem does not contain the modules directory at all.\n\ + You might want to check the list of mounted filesystems and if /mnt is\n\ + not empty run 'ls /mnt/lib/modules' to check." +init_loadufs=" Loading of UnionFS failed - Either module is not present or \ +module\n does not match the running kernel. If you do not want to see this \ +\n message remove the token 'unionfs' from kernel command line." +init_loadcow=" Loading of Copy On Write (COW - special block device) module \ +failed -\n Either module is not present or module does not match the \ +running\n kernel. If you do not want to see this message remove the token \ +'cowloop' from kernel command line." +init_cownonbd=" Loading of cow module is of no sense if no network block \ +device is used or\n UnionFS was specified as read write layer too. Remove \ +UnionFS token from\n kernel commandline if cowloop should be used instead." +init_ldcfg="Starting ldconfig - switch it off via kernel cmdline option \ +'noldsc'" +init_errlog="Unable to create the logfile configuration in \ +/etc/${D_SYSCONFDIR}. That\n might indicate some severe error." +init_fstab="Failed to create /etc/fstab in the clients root filesystem. The\n\ + noexistence of the file might produce some unexpected behaviour of\n\ + mount commands." +init_errldcfg=" For some reason the generation of ld.so.cache did not \ +finish in time." +init_infldcfg=" You decided not to recreate \ +/etc/ld.so.cache file. That might cause errors\n if libraries are installed \ +after this file was created on server." +init_errcfg="of this client did not finish in\n time. You might check the \ +process list and list the modules loaded until\n now." +init_errhw=" For some reason the hardware autoconfig $init_errcfg" +init_errsw=" For some reason the software configuration $init_errcfg" +init_wait=" Waited $i ticks to unmount kernel module directory ..." +init_errumnt=" Unmount of the kernel modules directory \ +failed for some reason. Some\n modprobe still active!?" +init_erritab=" The file /etc/inittab does not exist or \ +is no regular one. It is needed\n for the bootup procedure to follow." +init_errsys=" Unmount of the kernel sys directory \ +failed for some\nreason. You will get some error messages that some files \ +could not be\n removed." +init_runinit=" Could not execute \ +run-init due to missing command or wrong\n parameters given." # messages from functions error_msg="An error occured during execution of $0 script:\n\n" -error_nfe="This error is not fatal - continuing ...\n" -error_shell="Running shell for debugging purposes now ...\n" +error_nfe="\n -> This error is not fatal - continuing ...\n" +error_shell="\n -> Running shell for debugging purposes now ...\n" error_modload="Failed to load module " error_modnfs="needed for mounting rootfs" error_iptool=" No tool for local IP configuration found. You should at \ @@ -48,6 +98,9 @@ running kernel - see error messages above\n\ error_portm=" Portmapper should be present, if normal mount \ command is used. Please\n check your initial ramdisk setup (mkdxsinitrd)." error_mntt=" No suitable mount tool found." +error_nodhcp=" You tried to configure system via dhcp, but no usable dhcp\n\ + client could be found. Please check that you have some client from\n\ + the following list installed: dhclient dhcpcd pump ipconfig." error_dhcp=" The following problems could produce that error:\n\ * The af_packet.ko module is either not loaded nor present in kernel.\n\ * No network device is present - either no module matching the hardware\n\ @@ -65,6 +118,8 @@ df_errserv="seems not to be installed or start script is not available\n \ so requesting the start of service make no sense. Please disable service\n \ or install the files needed." df_errudev=" udev daemon is not available. Some devices might not apprear." +df_errhotpl=" Hotplug subdirectory is missing! udev(d) might not work as \ +expected." df_errcron=" The cron start script $df_errserv" df_errsysl=" The syslog start script $df_errserv" df_errsshd=" The sshd start script $df_errserv" diff --git a/initrd/initrd-stuff/init b/initrd/initrd-stuff/init index 32a6f763..18cc1583 100755 --- a/initrd/initrd-stuff/init +++ b/initrd/initrd-stuff/init @@ -135,7 +135,7 @@ nfsroot=\"${NFSROOT}\"\n" >> /etc/machine-setup done # load block device driver if needed if [ -n "${NBD}" ] ; then - modprobe ${MODPRV} ${NBD} || error $init_errnbd + modprobe ${MODPRV} ${NBD} || error "$init_errnbd" fi # check if at least one type of IP configuration is availabe if [ -z "$DHCP" -a -z "$LDAP" -a -z "$IPINFO" ] ; then @@ -144,12 +144,12 @@ if [ -z "$DHCP" -a -z "$LDAP" -a -z "$IPINFO" ] ; then . /etc/machine-setup IPINFO="ip=$clientip:$serverip:$gateway:$subnet_mask" else - error $init_errip + error "$init_errip" fi fi # for ldap configuration at least basic IP setup is needed to contact the # server -[ -z "$DHCP" -a -n "$LDAP" -a -z "$IPINFO" ] && error $init_errldap +[ -z "$DHCP" -a -n "$LDAP" -a -z "$IPINFO" ] && error "$init_errldap" # set debug level and logfile echo "Setting debuglevel to ${DEBUGLEVEL}" export MODPRV=" " @@ -172,9 +172,7 @@ else LOGFILE="/dev/null" fi # load network adaptor modules -modprobe ${MODPRV} -a ${NWMODULES} || error " Failed to load the network \ -adaptor modules defined via mkdxsinitrd\n run. Please rerun and list the \ -appropriate modules (without .ko)." +modprobe ${MODPRV} -a ${NWMODULES} || error "$init_errnwad" # set up loopback networking (ipsetup - function defined in /etc/functions) ipsetup 127.0.0.1 255.0.0.0 0.0.0.0 127.255.255.255 lo # analyze ip information from the kernel command line and put parts @@ -201,9 +199,7 @@ if [ -n "$noipyet" ] ; then waitfor /tmp/dhcp-done 20000 . /etc/machine-setup [ -z "$clientip" -o -z "$subnet_mask" -o -z "$gateway" \ - -o -z "$broadcast_address" ] && error " Did not get complete IP \ -configuration via DHCP. You may want to add\n a vendor code identifier \ -via kernel commandline (vci=VCI)." + -o -z "$broadcast_address" ] && error "$init_errdhcp" ipsetup $clientip $subnet_mask $gateway $broadcast_address eth0 fi # ... or ldap if available (in background) @@ -224,20 +220,13 @@ if [ -n "${NBD}" ] ; then fi echo "Diskless client using ${NBD} on $nbdhost:$nbdport with $RFST" # fixme: check for fs in /proc/filesystems before trying to load the module - modprobe ${MODPRV} ${RFST} || error " Failed to load the requested \ -filesystem module for the client root\n filesystem ontop of the (D)NBD." \ - nonfatal - - errmsg=" For some reason the network block device /dev/${NBD}0 never \ -appeared.\n You might want to check udev or your list of static device \ -files." + modprobe ${MODPRV} ${RFST} || error "$init_errnbd" nonfatal case "${NBD}" in # network block device present in standard kernel nbd) - waitfor /dev/nbd0 10000 || error $errmsg - nbd-client $nbdhost $nbdport /dev/nbd0 || error " Failed to start \ -the network block device client. Unable to mount root\n filesystem." + waitfor /dev/nbd0 10000 || error "$init_nbddev" + nbd-client $nbdhost $nbdport /dev/nbd0 || error "$init_nbdcl" RDEV=/dev/nbd0 ;; # dnbd by Thorsten Zitterell @@ -249,7 +238,7 @@ the network block device client. Unable to mount root\n filesystem." clientopt="-c /dnbd/cache" waitfor /tmp/cache 10000 fi - waitfor /dev/dnbd0 10000 || error $errmsg + waitfor /dev/dnbd0 10000 || error "$init_nbddev" while ! dnbd-client -b $nbdhost -d /dev/dnbd0 $clientopt ; do usleep 10 done @@ -278,13 +267,7 @@ fi # get the complete collection of kernel modules available mount -n --bind /mnt/lib/modules/${KERNEL} /lib/modules/${KERNEL} || \ - error " The requested modules directory does not exist. That could mean:\n\ - * The kernel was updated but mkdxsinitrd was not run afterwards.\n\ - * The mounted filesystem does not contain the modules directory at all.\n\ - You might want to check the list of mounted filesystems and if /mnt is\n\ - not empty run 'ls /mnt/lib/modules' to check." -# You might want to check the list of mounted filesystems and if /mnt is\n\ -# not empty run 'ls /mnt/lib/modules' to check." + error "$init_moddir" # start hardware configuration as background process hwautocfg & @@ -292,22 +275,15 @@ hwautocfg & RWDIR=/dev/shm if [ -n "${UNIONFS}" -o -n "${UNION}" ] ; then modprobe ${MODPRV} unionfs || { - error " Loading of UnionFS failed - Either module is not present or \ -module\n does not match the running kernel. If you do not want to see this \ -\n message remove the token 'unionfs' from kernel command line." nonfatal + error "$init_loadufs" nonfatal UNIONFS=""; } fi if [ -n "${COWLOOP}" ] ; then modprobe ${MODPRV} cowloop || { - error " Loading of Copy On Write (COW - special block device) module \ -failed -\n Either module is not present or module does not match the \ -running\n kernel. If you do not want to see this message remove the token \ -'cowloop' from kernel command line." nonfatal + error "$init_loadcow" nonfatal COWLOOP=""; } if [ -z "${NBD}" -o -n "${UNIONFS}" ] ; then - error " Loading of cow module is of no sense if no network block device \ -is used or\n UnionFS was specified as read write layer too. Remove UnionFS \ -token from\n kernel commandline if cowloop should be used instead." + error "$init_cownonbd" COWLOOP=""; fi fi @@ -320,7 +296,6 @@ if [ -n "${UNION}" ] ; then fi # setup of client root filesystem dependent on the availability of UnionFS -msg="Starting ldconfig - switch it off via kernel cmdline option 'noldsc'" if [ -n "${UNIONFS}" ] ; then echo "Using UnionFS for rw access" [ -n ${NFSROOT} ] && NFSRO=nfs @@ -332,7 +307,7 @@ if [ -n "${UNIONFS}" ] ; then mkdir -p /mnt/uniontmp mount -n --move ${RWDIR}/uniontmp /mnt/uniontmp # run ldconfig if not switched off via kernel command line - [ -z "${NOLDSC}" ] && echo $msg && ldconfig /etc/ld.so.cache & + [ -z "${NOLDSC}" ] && echo $init_ldcfg && ldconfig /etc/ld.so.cache & elif [ -n "${COWLOOP}" -a -n "${NBD}" ] ; then : else @@ -343,7 +318,7 @@ else mount -n --bind ${RWDIR}/${path} /mnt/${path} done # see above ... - [ -z "${NOLDSC}" ] && echo $msg && ldconfig /tmp/ld.so.cache & + [ -z "${NOLDSC}" ] && echo $init_ldcfg && ldconfig /tmp/ld.so.cache & for path in ${D_RODIRSINRW}; do if [ -d /mnt/${path} ] ; then LIST=${path}" "$LIST @@ -383,8 +358,7 @@ echo "fs complete" >/tmp/fscmpl # write debug file information after filesystem setup completed echo -e "# /etc${D_SYSCONFDIR}/logfile - file created by $0\n#\n# logfile for linux diskless client specific debugging output\nLOGFILE=\"$LOGFILE\"\n#\n# debug level\nDEBUGLEVEL=\"$DEBUGLEVEL\"" > /mnt/etc/${D_SYSCONFDIR}/logfile || \ - error "Unable to create the logfile configuration in /etc/${D_SYSCONFDIR}. \ -That\n might indicate some severe error." + error "$init_errlog" # run distribution independent and dependent configuration of files and # services @@ -403,9 +377,7 @@ Suchodoletz, dirk@goe.net\n\nrootfs\t\t/\t\trootfs\t\tro\t\t 0 0\n\ proc\t\t/proc\t\tproc\t\tdefaults\t 0 0\ninitramdevs\t/dev\t\ttmpfs\ \t\trw\t\t 0 0\ndevpts\t\t/dev/pts\tdevpts\t\tmode=0620,gid=5\t 0 0\n\ usbfs\t\t/proc/bus/usb\tusbfs\t\tnoauto\t\t 0 0" >>/mnt/etc/fstab || \ - error "Failed to create /etc/fstab in the clients root filesystem. The\n\ - noexistence of the file might produce some unexpected behaviour of\n\ - mount commands." + error "$init_fstab" # copy library cache if generated if [ -z "${NOLDSC}" ] ; then if waitfor /tmp/ldcfg 50000 ; then @@ -413,23 +385,16 @@ if [ -z "${NOLDSC}" ] ; then cp /mnt/tmp/ld.so.cache /mnt/etc/ld.so.cache rm /mnt/tmp/ld.so.cache; } else - error " For some reason the generation of \ -ld.so.cache did not finish in time." + error "$init_errldcfg" fi else - error " You decided not to recreate \ -/etc/ld.so.cache file. That might cause errors\n if libraries are installed \ -after this file was created on server." nonfatal + error "$init_infldcfg" nonfatal fi # copy machine configuration (from global settings, additions made within # here and from dhcp/ldap sources) to client /etc for later checks cp /etc/machine-setup /mnt/etc -waitfor /tmp/hwcfg 20000 || error " For some reason the hardware autoconfig \ -of this client did not finish in\n time. You might check the process list \ -and list the modules loaded until\n now." -waitfor /tmp/svcfg 20000 || error " For some reason the software config \ -of this client did not finish in\n time. You might check the process list \ -and list the modules loaded until\n now." +waitfor /tmp/hwcfg 20000 || error "$init_errhw" +waitfor /tmp/svcfg 20000 || error "$init_errsw" # IP configuration is made and should not be updated automatically, udevd # should be killed if started within init killall -9 dhcpcd dhclient pump 2>/dev/null @@ -443,26 +408,20 @@ postinit # unmount the bind mounted modules directory for i in 0 40 100 200 300 500 800 1000 1200; do usleep $i && umount -n /lib/modules/${KERNEL} 2>/dev/null && break - error " Waited $i ticks to unmount kernel module directory ..." nonfatal + error "$init_wait" nonfatal done -[ $i -gt 1000 ] && error " Unmount of the kernel modules directory \ -failed for some reason. Some\n modprobe still active!?" +[ $i -gt 1000 ] && error "$init_errumnt" # check for inittab file -test -f /mnt/etc/inittab || error " The file /etc/inittab does not exist or \ -is no regular one. It is needed\n for the bootup procedure to follow." +test -f /mnt/etc/inittab || error "$init_erritab" # close runlevel script for stuff to execute during early bootup d_mkrlscript close boot.ld "" # preparations to leave initrd - umounting ... -umount -n /sys || error " Unmount of the kernel sys directory \ -failed for some\nreason. You will get some error messages that some files \ -could not be\n removed." nonfatal +umount -n /sys || error "$init_errsys" nonfatal umount -n /proc/bus/usb >/dev/null 2>&1 mount -n --move /dev /mnt/dev killall -9 udevd 2>/dev/null umount -n /proc [ -n "${UNIONFS}" ] && mount -n --move /root /mnt/mnt -# new kind of pivoting -exec run-init -c dev/console /mnt /sbin/init || error " Could not execute \ -run-init due to missing command or wrong\n parameters given." - +# new style of pivoting +exec run-init -c dev/console /mnt /sbin/init || error "$init_runinit" -- cgit v1.2.3-55-g7522