diff options
-rw-r--r-- | initramfs/initrd-stuff/etc/messages | 2 | ||||
-rwxr-xr-x | initramfs/initrd-stuff/init | 22 |
2 files changed, 17 insertions, 7 deletions
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 |