summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDirk von Suchodoletz2009-05-25 16:40:44 +0200
committerDirk von Suchodoletz2009-05-25 16:40:44 +0200
commit0c8db90631489786c8796afcca13e3019bc30dae (patch)
tree0d26a41da7e6289df9c6460a13cc6d1f272809a3
parentSome fixes for PreBoot ... (diff)
downloadcore-0c8db90631489786c8796afcca13e3019bc30dae.tar.gz
core-0c8db90631489786c8796afcca13e3019bc30dae.tar.xz
core-0c8db90631489786c8796afcca13e3019bc30dae.zip
Minor improvements for PreBoot ...
git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2881 95ad53e4-c205-0410-b2fa-d234c58c8868
-rw-r--r--boot-env/preboot/cd/iso/LICENSE2
-rwxr-xr-xboot-env/preboot/preboot.sh6
-rwxr-xr-xboot-env/preboot/uclib-rootfs/init19
3 files changed, 15 insertions, 12 deletions
diff --git a/boot-env/preboot/cd/iso/LICENSE b/boot-env/preboot/cd/iso/LICENSE
index ad3c3c57..7233bc7e 100644
--- a/boot-env/preboot/cd/iso/LICENSE
+++ b/boot-env/preboot/cd/iso/LICENSE
@@ -1,3 +1,3 @@
-This package is free software distributed under the GPL version 2.
+This package is free software distributed under the GPL version 2.
See http://openslx.org/COPYING. For additional information on the
SYSLINUX component by H.P. Anwin check http://syslinux.zytor.com!
diff --git a/boot-env/preboot/preboot.sh b/boot-env/preboot/preboot.sh
index 2965c96d..b14532ed 100755
--- a/boot-env/preboot/preboot.sh
+++ b/boot-env/preboot/preboot.sh
@@ -29,7 +29,7 @@ sysname=$(readlink $sysname)
echo "0" >result
[ x$DEBUGLEVEL != x0 ] && dialog --no-cancel --menu "Choose Debug Level:" \
20 65 10 "0" "no debug output (splash)" \
- "2" "standard debug output"
+ "2" "standard debug output" \
"3" "debug output and shell" 2>result
# change debug level here if required (adjusted for the rest of the interactive
@@ -49,8 +49,8 @@ w3m -o confirm_qq=no \
chvt 1
# fetch kernel and initramfs of selected system
-wget -O /tmp/kernel $boot_uri/$kernel | dialog --progressbox 5 65
-wget -O /tmp/initramfs $boot_uri/$initramfs | dialog --progressbox 5 65
+wget -O /tmp/kernel $boot_uri/$kernel | dialog --progressbox 3 65
+wget -O /tmp/initramfs $boot_uri/$initramfs | dialog --progressbox 3 65
# read primary IP configuration to pass it on (behaviour like IPAPPEND=1 of
# PXElinux)
diff --git a/boot-env/preboot/uclib-rootfs/init b/boot-env/preboot/uclib-rootfs/init
index 7b54516b..a194e5e7 100755
--- a/boot-env/preboot/uclib-rootfs/init
+++ b/boot-env/preboot/uclib-rootfs/init
@@ -87,7 +87,7 @@ for mod in ${ramfs_nicmods} \
done
# read kernel commandline
-read KCMDLINE < /proc/cmdline
+read KCMDLINE </proc/cmdline
# read the system wide machine-setup and then the kernel commandline
for opts in ${KCMDLINE} ; do
case ${opts} in
@@ -96,6 +96,9 @@ for opts in ${KCMDLINE} ; do
# ... or a specified debug level (will be passed to next stage)
debug=*)
DEBUGLEVEL=${opts#debug=};;
+ # WLAN ssid (most probably passed that way, unused yet ...)
+ ssid=*)
+ SSID=${opts#SSID=};;
esac
done
@@ -103,23 +106,23 @@ done
# preboot init does not succeed (e.g. missing kernel module/firmware for the
# network adaptor)
if [ "${DEBUGLEVEL}" -gt 0 ] ; then
- cat<<EOF > /bin/watchdog
+ cat<<EOF >/bin/watchdog
#!/bin/ash
echo \$$ > /tmp/watchdogpid
[ ! -f /proc/version ] && mount -n -t proc proc /proc
-sleep 120 2> /dev/null
-echo "o" > /proc/sysrq-trigger
+sleep 120 2>/dev/null
+echo "o" >/proc/sysrq-trigger
EOF
chmod u+x /bin/watchdog
watchdog &
fi
-if [ -n "${essid}" ] ; then
+if [ -n "${SSID}" ] ; then
# WLAN setup will most probably change the network interface name stored in
# nwif (to wlan0 or something like that)
:
else
- # check here for the active ethernet link
+ # check here for the active Ethernet link
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 \
@@ -150,7 +153,7 @@ echo "macaddr=$macaddr" >>/etc/initramfs-setup
# at this point a little selection script could be downloaded, which lets the
# user choose what kind of SLX client he wants to get
dialog --infobox "Fetching preboot interactive part and configuration from \
-the net ..." 4 65
+the net ($boot_uri) ..." 4 65
wget -q -c -O /tmp/preboot.env $boot_uri/bootloader/${preboot_id}.env
mkdir /preboot
tar -xzf /tmp/preboot.env -C /preboot
@@ -169,5 +172,5 @@ exec ./preboot.sh
dialog --msgbox "The execution of the main preboot component failed. Please \
check network access of your box. Is $boot_uri reachable!?" 6 65
# ping -c 1 $boot_uri
-sleep 20 && echo "o" > /proc/sysrq-trigger
+sleep 20 && echo "o" >/proc/sysrq-trigger