summaryrefslogtreecommitdiffstats
path: root/initramfs/initrd-stuff/init
diff options
context:
space:
mode:
authorDirk von Suchodoletz2006-12-14 20:41:21 +0100
committerDirk von Suchodoletz2006-12-14 20:41:21 +0100
commit536dedb52774612e24466d98fb7f043d581b594b (patch)
tree28548829558120b041c09164fdf7c08b33bb6f6e /initramfs/initrd-stuff/init
parentFirst steps to include (open)SuSE10.2 into SLX environment (see #98). Tried t... (diff)
downloadcore-536dedb52774612e24466d98fb7f043d581b594b.tar.gz
core-536dedb52774612e24466d98fb7f043d581b594b.tar.xz
core-536dedb52774612e24466d98fb7f043d581b594b.zip
Autopoweroff if stuck in Stage3/initramfs. Unfortunately rather CPU
intensive if no (u)sleep binary is used but shell instead (for some reason TMOUT=$1 read does not work in init) git-svn-id: http://svn.openslx.org/svn/openslx/trunk@535 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'initramfs/initrd-stuff/init')
-rwxr-xr-xinitramfs/initrd-stuff/init20
1 files changed, 10 insertions, 10 deletions
diff --git a/initramfs/initrd-stuff/init b/initramfs/initrd-stuff/init
index 366086ee..097e8c15 100755
--- a/initramfs/initrd-stuff/init
+++ b/initramfs/initrd-stuff/init
@@ -45,7 +45,7 @@ mkdir -p ${DEVDIR}/.udevdb
[ ! -d /sys/class ] && mount -n -t sysfs sysfs /sys
# redirect console (after /dev/console is available, and /dev mounted)
-exec < /dev/console > /dev/console 2>&1
+#exec < /dev/console > /dev/console 2>&1
# if no kernel version is set, try to get it directly from /proc
if [ -z $KERNEL ] ; then
@@ -201,15 +201,15 @@ done
# 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 &
+errorhalt () {
+if [ "${DEBUGLEVEL}" -lt 4 ] ; then
+ [ ! -f /proc/version ] && mount -n -t proc proc /proc
+ [ ! -f /proc/sysrq-trigger ] && echo -e $init_nosysrq
+ sleep 120
+ 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