From 13df36809daa0c2cb11a924a9ea824d128deae9c Mon Sep 17 00:00:00 2001 From: Dirk von Suchodoletz Date: Wed, 1 Aug 2007 14:55:13 +0000 Subject: More for local device startup ... (see r1296) git-svn-id: http://svn.openslx.org/svn/openslx/trunk@1297 95ad53e4-c205-0410-b2fa-d234c58c8868 --- initramfs/initrd-stuff/etc/messages | 2 ++ initramfs/initrd-stuff/init | 22 +++++++++++++++------- 2 files changed, 17 insertions(+), 7 deletions(-) (limited to 'initramfs') diff --git a/initramfs/initrd-stuff/etc/messages b/initramfs/initrd-stuff/etc/messages index f31040a3..74346bcd 100644 --- a/initramfs/initrd-stuff/etc/messages +++ b/initramfs/initrd-stuff/etc/messages @@ -45,6 +45,8 @@ mode. Try\n to reorder your network module list." 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_erripcfg=" Up to now no IP configuration is available. If there is any \ +local file config\n the system may work locally." init_errbld=" 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." diff --git a/initramfs/initrd-stuff/init b/initramfs/initrd-stuff/init index 8d8384d8..e3257bc9 100755 --- a/initramfs/initrd-stuff/init +++ b/initramfs/initrd-stuff/init @@ -377,13 +377,21 @@ fi [ -z "$nodhcp" ] && rundhcp ${vci} & if [ -n "$noipyet" ] ; then waitfor /tmp/dhcp-done 20000 - . /etc/machine-setup - [ -f /tmp/confviadhcp ] && . /tmp/confviadhcp - [ -z "$clientip" -o -z "$subnet_mask" -o -z "$gateway" \ - -o -z "$broadcast_address" ] && error "$init_errdhcp" - ip addr add $clientip/$(nm2pref $subnet_mask) broadcast $broadcast_address \ - dev $nwif - ip route add default via $gateway + if [ -f /etc/machine-setup ] ; then + . /etc/machine-setup + [ -f /tmp/confviadhcp ] && . /tmp/confviadhcp + [ -z "$clientip" -o -z "$subnet_mask" -o -z "$gateway" \ + -o -z "$broadcast_address" ] && error "$init_errdhcp" + ip addr add $clientip/$(nm2pref $subnet_mask) broadcast $broadcast_address \ + dev $nwif + ip route add default via $gateway + else + if [ -n "$file" -a "$srvproto" = "lbdev" ] ; then + error "$init_erripcfg" nonfatal + else + error "$init_erripcfg" + fi + fi fi # check if serverip is set as variable @@@serverip@@@ sed "s,@@@serverip@@@,$serverip," -i /etc/machine-setup -- cgit v1.2.3-55-g7522