summaryrefslogtreecommitdiffstats
path: root/initramfs/initrd-stuff/init
diff options
context:
space:
mode:
authorDirk von Suchodoletz2006-12-02 21:03:33 +0100
committerDirk von Suchodoletz2006-12-02 21:03:33 +0100
commit8f6e8a32a34e3f2b1882dc1287098a24141fbe69 (patch)
tree88aaceb0ef4d102d0694170c9c823303fdbe1121 /initramfs/initrd-stuff/init
parentNew Debian Packaging Script based on the install target of Makefile (diff)
downloadcore-8f6e8a32a34e3f2b1882dc1287098a24141fbe69.tar.gz
core-8f6e8a32a34e3f2b1882dc1287098a24141fbe69.tar.xz
core-8f6e8a32a34e3f2b1882dc1287098a24141fbe69.zip
Renaming of the floppy image for vmware stuff ... Optional parameter for
directly passing location of machine-setup to mkdxsinitrd. Fixes and additions (auto power off - not enabled yet) and bugfix for missing netmask ... git-svn-id: http://svn.openslx.org/svn/openslx/trunk@526 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'initramfs/initrd-stuff/init')
-rwxr-xr-xinitramfs/initrd-stuff/init20
1 files changed, 17 insertions, 3 deletions
diff --git a/initramfs/initrd-stuff/init b/initramfs/initrd-stuff/init
index a2972105..18c06f22 100755
--- a/initramfs/initrd-stuff/init
+++ b/initramfs/initrd-stuff/init
@@ -2,11 +2,11 @@
# main script for new type of initial ramdisk for OpenSLX linux diskless
# clients version 4
#
-# Dirk von Suchodoletz <dirk@goe.net>, 19-11-2006
+# Dirk von Suchodoletz <dirk@goe.net>, 02-12-2006
# <mj0@uni-freiburg.de> (xenbr), 27-09-2006
#
# (c) 2006 - RZ Universitaet Freiburg
-# (c) 2006 - OpenSLX.ORG project
+# (c) 2006 - OpenSLX.ORG Project
# functions common for all distros, messages contains all error and info
# output (for some reason the error output is not produced properly - crash)
@@ -197,6 +197,20 @@ nfsroot=\"${nfsroot}\"\n" >> /etc/machine-setup
XENBR=1;;
esac
done
+# at this point a timer should be started to ensure an automated reboot
+# or halt of the machine if SLX init does not succeed (e.g. missing kernel
+# module for the network adaptor)
+# fixme/testme!!
+# errorhalt () {
+# if [ "${DEBUGLEVEL}" -lt 3 ] ; then
+# [ ! -f /proc/version ] && mount -n -t proc proc /proc
+# [ ! -f /proc/sysrq-trigger ] && echo -e $init_nosysrq
+# usleep 100000
+# echo "o" > /proc/sysrq-trigger
+# fi
+# }
+# errorhalt &
+
# check if at least one type of IP configuration is availabe
if [ -z "$DHCP" -a -z "$LDAP" -a -z "$IPINFO" ] ; then
echo -e "# You did not specify any advanced configuration mode for your \
@@ -251,7 +265,7 @@ ipsetup 127.0.0.1 255.0.0.0 0.0.0.0 127.255.255.255 lo
if [ -n "$IPINFO" ] ; then
getip () {
val=$IPINFO; i=$(expr $1 - 1);
- while [ $i -gt 0 ] ; do
+ while [ $i -ge 0 ] ; do
val=${val#*:} ; i=$(expr $i - 1);
done;
echo $val|sed "s/:.*//"; }