summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--initramfs/cdboot/README.isolinux1
-rwxr-xr-xinitramfs/cdboot/init24
-rw-r--r--tools/busybox.config6
3 files changed, 16 insertions, 15 deletions
diff --git a/initramfs/cdboot/README.isolinux b/initramfs/cdboot/README.isolinux
deleted file mode 100644
index 307d279c..00000000
--- a/initramfs/cdboot/README.isolinux
+++ /dev/null
@@ -1 +0,0 @@
-Part of syslinux package of HPA. Needed to create a ISO boot image.
diff --git a/initramfs/cdboot/init b/initramfs/cdboot/init
index 88cb04a3..40368351 100755
--- a/initramfs/cdboot/init
+++ b/initramfs/cdboot/init
@@ -1,5 +1,5 @@
#!/bin/ash
-# Copyright (c) 2007 - OpenSLX GmbH
+# Copyright (c) 2008 - OpenSLX GmbH
#
# This program is free software distributed under the GPL version 2.
# See http://openslx.org/COPYING
@@ -9,11 +9,12 @@
#
# General information about OpenSLX can be found at http://openslx.org
#
-# Main script for cd-boot demo initial ramdisk - preloading environment for
+# Main script for cd-boot demo initial ramfs - preloading environment for
# for running OpenSLX linux stateless clients version 4 for testing
#############################################################################
-# compute prefix bit number from netmask
+# helper function: compute prefix bit number from netmask
+# fixme: replace with ipcalc -p $ip $netmask
nm2pref () {
set $(IFS="."; echo $1)
local n=0
@@ -130,22 +131,21 @@ ip link set dev lo up
ip addr add 127.0.0.1/8 dev lo
ip link set dev $nwif up || echo "I did not find any usable network adaptor."
-# start udhcpc here
+# start udhcpc, if no lease could be optained, start debug shell
mkdir -p /usr/share/udhcpc
echo -e "#!/bin/ash\nunset infomsg HOME IFS mask lease interface DEBUGLEVEL \
BOOT_IMAGE\nset >/tmp/ipstuff" >/usr/share/udhcpc/default.script
chmod u+x /usr/share/udhcpc/default.script
modprobe -q af_packet
[ -n $vci ] && vci="-V $vci"
-udhcpc -n -q $vci -s /usr/share/udhcpc/default.script -i $nwif 2>/dev/null || \
- echo "No answer from a DHCP server received"; /bin/ash
+udhcpc -n -q $vci -s /usr/share/udhcpc/default.script -i $nwif 2>/dev/null
if test -e /tmp/ipstuff ; then
. /tmp/ipstuff
for i in $dns ; do
echo "nameserver $i" >> /etc/resolv.conf
done
else
- echo "Did not get any proper IP configuration"
+ echo "Did not get any proper IP configuration"; /bin/ash
fi
ip addr add $ip/$(nm2pref $subnet) dev $nwif
ip route add default via $router
@@ -153,10 +153,12 @@ ip route add default via $router
# at this point a little selection script could be downloaded, which lets the
# user choose what kind of SLX client he wants to get
-# get kernel and initramfs
-( wget -q -c -O /tmp/kernel ftp://openslx:OpenS1X@archive.ruf.uni-freiburg.de/kernel && \
-wget -q -c -O /tmp/iramfs ftp://openslx:OpenS1X@archive.ruf.uni-freiburg.de/iramfs ) || \
-/bin/ash
+# get kernel and initramfs, if something fails start debug shell
+( wget -q -c -O /tmp/kernel \
+ ftp://openslx:OpenS1X@archive.ruf.uni-freiburg.de/kernel 2>/dev/null && \
+wget -q -c -O /tmp/iramfs \
+ ftp://openslx:OpenS1X@archive.ruf.uni-freiburg.de/iramfs 2>/dev/null ) || \
+ /bin/ash
# start the new kernel with initialramfs and cmdline
kexec -l /tmp/kernel --initrd=/tmp/iramfs --append="ip=$ip:$siaddr:$router:$subnet\
diff --git a/tools/busybox.config b/tools/busybox.config
index e76a8114..aca058db 100644
--- a/tools/busybox.config
+++ b/tools/busybox.config
@@ -172,7 +172,7 @@ CONFIG_FALSE=y
# CONFIG_FOLD is not set
CONFIG_HEAD=y
# CONFIG_FEATURE_FANCY_HEAD is not set
-CONFIG_HOSTID=y
+# CONFIG_HOSTID is not set
CONFIG_ID=y
# CONFIG_INSTALL is not set
# CONFIG_FEATURE_INSTALL_LONG_OPTIONS is not set
@@ -611,8 +611,8 @@ CONFIG_FEATURE_IP_TUNNEL=y
# CONFIG_IPROUTE is not set
# CONFIG_IPTUNNEL is not set
# CONFIG_IPRULE is not set
-# CONFIG_IPCALC is not set
-# CONFIG_FEATURE_IPCALC_FANCY is not set
+CONFIG_IPCALC=y
+CONFIG_FEATURE_IPCALC_FANCY=y
# CONFIG_FEATURE_IPCALC_LONG_OPTIONS is not set
# CONFIG_NAMEIF is not set
# CONFIG_FEATURE_NAMEIF_EXTENDED is not set