diff options
author | Dirk von Suchodoletz | 2009-05-23 20:59:35 +0200 |
---|---|---|
committer | Dirk von Suchodoletz | 2009-05-23 20:59:35 +0200 |
commit | 3da5200d713ce060ce981e98813a4bc5be71b342 (patch) | |
tree | f5635a06b538a0d3a72223a2086a330c23053617 /boot-env/preboot/uclib-rootfs/init | |
parent | Moved clear to a place where it makes sense (libraries present) and removed (diff) | |
download | core-3da5200d713ce060ce981e98813a4bc5be71b342.tar.gz core-3da5200d713ce060ce981e98813a4bc5be71b342.tar.xz core-3da5200d713ce060ce981e98813a4bc5be71b342.zip |
Some enhancements for PreBoot ...
git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2879 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'boot-env/preboot/uclib-rootfs/init')
-rwxr-xr-x | boot-env/preboot/uclib-rootfs/init | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/boot-env/preboot/uclib-rootfs/init b/boot-env/preboot/uclib-rootfs/init index 7a879987..62223de4 100755 --- a/boot-env/preboot/uclib-rootfs/init +++ b/boot-env/preboot/uclib-rootfs/init @@ -10,7 +10,7 @@ # General information about OpenSLX can be found at http://openslx.org # # Main script for preboot initial ramfs - preloading environment for running -# OpenSLX linux stateless clients version 5 for testing +# OpenSLX linux stateless clients version 5. fetchip () { # we expect to get an ip address within 10++ seconds @@ -30,20 +30,25 @@ for i in 1 2 ; do if [ $i -eq 1 ] ; then sleep 1 else - echo "Did not get any proper IP configuration"; /bin/ash + dialog --msgbox "Did not get any proper IP configuration: Please check \ +that your Ethernet card is supported, the machine is connected to the network \ +and a DHCP server is answering your requests." 7 65 + ash + echo "o" >/proc/sysrq-trigger fi fi done } ############################################################################# +# PreBoot init main part + # device files get their own filesystem devdir="/dev" mount -n -t tmpfs -o 'size=25%,mode=0755' initramfsdevs ${devdir} DEBUGLEVEL=0 -# create basic device files an directories in dev (for most hardware related -# devices mdev should handle that) +# 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" \ "/dev/urandom c 1 9" "/dev/kmsg c 1 11" "/dev/tty0 c 4 0" \ "/dev/tty1 c 4 1" "/dev/tty2 c 4 2" "/dev/tty3 c 4 3" \ @@ -54,7 +59,9 @@ for i in "/dev/mem c 1 1" "/dev/null c 1 3" "/dev/zero c 1 5" \ "/dev/fb0 c 29 0" "/dev/bootsplash p" "/dev/xconsole p"; do mknod $i done -mkdir -p ${devdir}/pts ${devdir}/shm ${devdir}/.udevdb ${devdir}/.udev +mkdir -p ${devdir}/pts ${devdir}/shm + +dialog --infobox "Starting OpenSLX preboot environment ..." 3 65 # initramfs-setup configuration (common settings for all clients using a # certain InitRamFS generated by slxmkramfs/mkdxsinitrd) @@ -138,7 +145,8 @@ 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 -echo "Fetching preboot interactive part and configuration from the net ..." +dialog --infobox "Fetching preboot interactive part and configuration from \ +the net ..." 4 65 wget -q -c -O /tmp/preboot.env $boot_uri/bootloader/${preboot_id}.env mkdir /preboot tar -xzf /tmp/preboot.env -C /preboot @@ -154,8 +162,8 @@ fi cd /preboot exec ./preboot.sh # we should never return from that one ... -echo "The execution of the main preboot environment failed. Please check" -echo "network access of your box. Is $boot_uri reachable!?" +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 |