summaryrefslogtreecommitdiffstats
path: root/initramfs/cdboot/init
diff options
context:
space:
mode:
Diffstat (limited to 'initramfs/cdboot/init')
-rwxr-xr-xinitramfs/cdboot/init22
1 files changed, 12 insertions, 10 deletions
diff --git a/initramfs/cdboot/init b/initramfs/cdboot/init
index 8a93d052..eb95c8fe 100755
--- a/initramfs/cdboot/init
+++ b/initramfs/cdboot/init
@@ -1,6 +1,5 @@
#!/bin/sh
-# Copyright (c) 2003 - 2006 - RZ Uni Freiburg
-# Copyright (c) 2006, 2007 - OpenSLX GmbH
+# Copyright (c) 2007 - OpenSLX GmbH
#
# This program is free software distributed under the GPL version 2.
# See http://openslx.org/COPYING
@@ -107,7 +106,7 @@ if [ -n "${essid}" ] ; then
:
else
# check here for the active ethernet link
- ip link show dev eth1 >/dev/null 2>&1 && error "$init_2eif" nonfatal
+ ip link show dev eth1 >/dev/null 2>&1 && echo "more than one nw if found"
fi
# set up loopback networking
@@ -117,13 +116,16 @@ ip addr add 127.0.0.1/8 dev lo
ip link set dev $nwif up || echo "noeth"
# start udhcpc here
-
-[ -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
+[ -f /lib/modules/@@@KERNVER@@@/kernel/net/packet/af_packet.ko ] && \
+ modprobe -q af_packet
+[ -n $vci ] && vci="-V $vci"
+udhcpc -b -q $vci -i $nwif 2>/dev/null
+
+[ -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
# start the new kernel with initialramfs and cmdline
#kexec