summaryrefslogtreecommitdiffstats
path: root/boot-env/preboot/uclib-rootfs/init
diff options
context:
space:
mode:
authorDirk von Suchodoletz2009-05-24 00:17:26 +0200
committerDirk von Suchodoletz2009-05-24 00:17:26 +0200
commitfdcb49e6d6a7bc2e87cab347d2df6a8843d24fa5 (patch)
treeaf240c619f417a10e1e816492702cd752eee116d /boot-env/preboot/uclib-rootfs/init
parentSome enhancements for PreBoot ... (diff)
downloadcore-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/uclib-rootfs/init')
-rwxr-xr-xboot-env/preboot/uclib-rootfs/init22
1 files changed, 13 insertions, 9 deletions
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