From 58f6fae954426db04c221be1377786afdccea3f7 Mon Sep 17 00:00:00 2001 From: Dirk von Suchodoletz Date: Sat, 25 Mar 2006 00:44:23 +0000 Subject: move vm-mount into InitRD, heavy cleanups in initial ramdisk environment, ... git-svn-id: http://svn.openslx.org/svn/openslx/ld4@127 95ad53e4-c205-0410-b2fa-d234c58c8868 --- initrd/initrd-stuff/init | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'initrd/initrd-stuff/init') diff --git a/initrd/initrd-stuff/init b/initrd/initrd-stuff/init index 4431ece3..7ac6c087 100755 --- a/initrd/initrd-stuff/init +++ b/initrd/initrd-stuff/init @@ -187,12 +187,12 @@ 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 # of it into several variables if [ -n "$IPINFO" ] ; then - IP=`echo $IPINFO|sed -e "s,:.*,,"` - SERVER=`echo $IPINFO|sed -e "s;[0-9\.]\{3,\}:;;" -e "s,:.*,,"` - GW=`echo $IPINFO|sed -e "s;[0-9\.]\{3,\}:[0-9\.]\{3,\}:;;" -e "s,:.*,,"` + IP=`echo $IPINFO|sed -e "s/:.*//"` + SERVER=`echo $IPINFO|sed -e "s/[0-9\.]\{3,\}://;s/:.*//"` + GW=`echo $IPINFO|sed -e "s/[0-9\.]\{3,\}:[0-9\.]\{3,\}://;s/:.*//"` # remove last colon after netmask if it was left there ... - IPINFO=`echo $IPINFO|sed -e "s,:$,,"` - NM=`echo $IPINFO|sed -e "s,.*:,,"` + IPINFO=`echo $IPINFO|sed -e "s/:$//"` + NM=`echo $IPINFO|sed -e "s/.*://"` echo -e "# ip configuration written by $0 script\nclientip=$IP\n\ sub_netmask=$NM\ngateway=$GW\nserverip=$SERVER" \ >>/etc/machine-setup @@ -368,7 +368,7 @@ else # run some specific stuff !? fi # script for stuff to execute during early bootup -d_mkbootld init +d_mkrlscript init boot.ld "Running post configuration required by init" echo "fs complete" >/tmp/fscmpl # write debug file information after filesystem setup completed @@ -420,13 +420,11 @@ 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." -# close runlevel script for stuff to execute during early bootup -d_mkbootld close # 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 -bash +[ $DEBUGLEVEL -gt 1 ] && sh # post init for some distro specific postinit @@ -442,6 +440,9 @@ failed for some reason. Some\n modprobe still active!?" # 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." +# 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 -- cgit v1.2.3-55-g7522