diff options
author | Dirk von Suchodoletz | 2006-12-14 20:41:21 +0100 |
---|---|---|
committer | Dirk von Suchodoletz | 2006-12-14 20:41:21 +0100 |
commit | 536dedb52774612e24466d98fb7f043d581b594b (patch) | |
tree | 28548829558120b041c09164fdf7c08b33bb6f6e /initramfs/initrd-stuff/etc/functions | |
parent | First steps to include (open)SuSE10.2 into SLX environment (see #98). Tried t... (diff) | |
download | core-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/etc/functions')
-rw-r--r-- | initramfs/initrd-stuff/etc/functions | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/initramfs/initrd-stuff/etc/functions b/initramfs/initrd-stuff/etc/functions index 4ede90c6..75af6c29 100644 --- a/initramfs/initrd-stuff/etc/functions +++ b/initramfs/initrd-stuff/etc/functions @@ -2,7 +2,7 @@ # (included by init, hwautocfg, servconfig, ... within OpenSLX initial # ramfs) # -# Dirk von Suchodoletz <dvs@OpenSLX.com>, 19-11-2006 +# Dirk von Suchodoletz <dvs@OpenSLX.com>, 14-12-2006 # Felix Endres, 30-04-2006 # <mj0@uni-freiburg.de> (xenbr), 12-12-2006 # Tobias Maier @@ -113,6 +113,16 @@ else fi return 0 } +# standard sleep command +sleep () { +if [ -x /bin/sleep ]; then + /bin/sleep $1 +#elif [ -x /bin/bash ]; then +# TMOUT=$1 read +else + usleep `expr $1 \* 100` +fi +} ############################################################################# # (re)generate dynamic linked libraries cache from /etc/ld.so.conf ldcfg () { |