diff options
author | Dirk von Suchodoletz | 2009-05-24 00:17:26 +0200 |
---|---|---|
committer | Dirk von Suchodoletz | 2009-05-24 00:17:26 +0200 |
commit | fdcb49e6d6a7bc2e87cab347d2df6a8843d24fa5 (patch) | |
tree | af240c619f417a10e1e816492702cd752eee116d /boot-env/preboot | |
parent | Some enhancements for PreBoot ... (diff) | |
download | core-fdcb49e6d6a7bc2e87cab347d2df6a8843d24fa5.tar.gz core-fdcb49e6d6a7bc2e87cab347d2df6a8843d24fa5.tar.xz core-fdcb49e6d6a7bc2e87cab347d2df6a8843d24fa5.zip |
Some fixes for PreBoot ...
git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2880 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'boot-env/preboot')
-rwxr-xr-x | boot-env/preboot/preboot.sh | 23 | ||||
-rwxr-xr-x | boot-env/preboot/uclib-rootfs/init | 22 |
2 files changed, 26 insertions, 19 deletions
diff --git a/boot-env/preboot/preboot.sh b/boot-env/preboot/preboot.sh index 7b5c2be0..2965c96d 100755 --- a/boot-env/preboot/preboot.sh +++ b/boot-env/preboot/preboot.sh @@ -27,13 +27,16 @@ sysname=$(readlink $sysname) # ask for desired debug level in stage3 if debug!=0 in preboot echo "0" >result -[ x$debuglevel != x0 ] && dialog --no-cancel --menu "Choose Debug Level:" \ - 20 65 10 "0" "no debug output" \ - "3" "standard debug output" 2>result - -debuglevel=$(cat result) -if [ x$debuglevel != x0 ]; then - debug="debug=$debuglevel" +[ x$DEBUGLEVEL != x0 ] && dialog --no-cancel --menu "Choose Debug Level:" \ + 20 65 10 "0" "no debug output (splash)" \ + "2" "standard debug output" + "3" "debug output and shell" 2>result + +# change debug level here if required (adjusted for the rest of the interactive +# part) +DEBUGLEVEL=$(cat result) +if [ x$DEBUGLEVEL != x0 ]; then + debug="debug=$DEBUGLEVEL" else debug="" fi @@ -46,14 +49,14 @@ w3m -o confirm_qq=no \ chvt 1 # fetch kernel and initramfs of selected system -wget -O /tmp/kernel $boot_uri/$kernel | dialog --progressbox 3 65 -wget -O /tmp/initramfs $boot_uri/$initramfs | dialog --progressbox 3 65 +wget -O /tmp/kernel $boot_uri/$kernel | dialog --progressbox 5 65 +wget -O /tmp/initramfs $boot_uri/$initramfs | dialog --progressbox 5 65 # read primary IP configuration to pass it on (behaviour like IPAPPEND=1 of # PXElinux) . /tmp/ipstuff -[ "x$debuglevel" != x0 ] && { clear; ash; } +[ "x$DEBUGLEVEL" != x0 ] && { clear; ash; } # start the new kernel with initialramfs and composed cmdline dialog --infobox "Booting OpenSLX client $label ..." 3 65 diff --git a/boot-env/preboot/uclib-rootfs/init b/boot-env/preboot/uclib-rootfs/init index 62223de4..7b54516b 100755 --- a/boot-env/preboot/uclib-rootfs/init +++ b/boot-env/preboot/uclib-rootfs/init @@ -19,12 +19,12 @@ for i in 1 2 ; do udhcpc -f -n -q $vci -s /usr/share/udhcpc/default.script -i $nwif 2>/dev/null if grep "ip=" /tmp/ipstuff >/dev/null 2>&1 ; then . /tmp/ipstuff - for i in $dns ; do - echo "nameserver $i" >>/etc/resolv.conf + for ns in $dns ; do + echo "nameserver $ns" >>/etc/resolv.conf done # simply add a single dns server for passing via kernel cmdline to stage3 # (quickhack, just the last, list of dns might be better ...) - echo "dnssrv=$i" >>/tmp/ipstuff + echo "dnssrv=$ns" >>/tmp/ipstuff return else if [ $i -eq 1 ] ; then @@ -46,7 +46,7 @@ done # device files get their own filesystem devdir="/dev" mount -n -t tmpfs -o 'size=25%,mode=0755' initramfsdevs ${devdir} -DEBUGLEVEL=0 +export DEBUGLEVEL=0 # create basic device files an directories in dev for i in "/dev/mem c 1 1" "/dev/null c 1 3" "/dev/zero c 1 5" \ @@ -60,6 +60,7 @@ for i in "/dev/mem c 1 1" "/dev/null c 1 3" "/dev/zero c 1 5" \ mknod $i done mkdir -p ${devdir}/pts ${devdir}/shm +export PATH=/bin:/sbin:/usr/bin/:/usr/sbin dialog --infobox "Starting OpenSLX preboot environment ..." 3 65 @@ -67,8 +68,6 @@ dialog --infobox "Starting OpenSLX preboot environment ..." 3 65 # certain InitRamFS generated by slxmkramfs/mkdxsinitrd) [ -f /etc/initramfs-setup ] && . /etc/initramfs-setup 2>/dev/null -export PATH=/bin:/sbin:/usr/bin/:/usr/sbin - # set a default LAN interface, has to be modified for WLAN or on machines # with more than one ethernet card built in nwif="eth0" @@ -78,9 +77,11 @@ nwif="eth0" [ ! -d /sys/class ] && mount -n -t sysfs sysfs /sys # load network adaptor modules -for mod in ${ramfs_nicmods} af_packet unix hid usbhid uhci-hcd ohci-hcd vesafb fbcon; do +for mod in ${ramfs_nicmods} \ + af_packet unix hid usbhid uhci-hcd ohci-hcd vesafb fbcon; do if [ x != x$(find /lib/modules -name ${mod}.ko) ]; then - modprobe $mod || echo "module $mod did not load for some reason" + modprobe $mod || \ + dialog --infobox "Module $mod did not load for some reason." 3 65 usleep 10000 fi done @@ -119,7 +120,10 @@ if [ -n "${essid}" ] ; then : else # check here for the active ethernet link - ip link show dev eth1 >/dev/null 2>&1 && echo "more than one nw if found" + ip link show dev eth1 >/dev/null 2>&1 && \ + dialog --msgbox "More than one network interface found. This could cause \ +some trouble as their activation and ordering depends on the module load \ +order ..." 7 65 fi # set up loopback networking and power up ethernet |