summaryrefslogtreecommitdiff
path: root/scripts/functions
diff options
context:
space:
mode:
authormaximilian attems <maks@debian.org>2007-08-07 01:19:38 +0200
committermaximilian attems <maks@debian.org>2007-08-07 01:19:38 +0200
commite23c0a34f51d053357fd6c171cd8edfd38bc3df0 (patch)
tree298d86b0be15a4ba9e865422f4a1eba00a76a7e2 /scripts/functions
parent494e8cf2560b3d139273513899164219c7c2ae98 (diff)
downloadinitramfs-tools-e23c0a34f51d053357fd6c171cd8edfd38bc3df0.tar.gz
initramfs-tools-e23c0a34f51d053357fd6c171cd8edfd38bc3df0.zip
scripts/functions: Implement non-zero panic boot arg
sleep the passed time and then call reboot. works as arg can only be numeric.
Diffstat (limited to 'scripts/functions')
-rw-r--r--scripts/functions5
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/functions b/scripts/functions
index 0b8d1e8..e73874d 100644
--- a/scripts/functions
+++ b/scripts/functions
@@ -62,6 +62,9 @@ panic()
# Disallow console access
if [ -n "${panic}" ] && [ "${panic}" = 0 ]; then
reboot
+ elif [ -n "${panic}" ]; then
+ sleep ${panic}
+ reboot
fi
modprobe i8042
modprobe atkbd
@@ -71,7 +74,7 @@ panic()
maybe_break()
{
- if [ x$1 = x${break} ]; then
+ if [ -n "${break}" ]; then
panic "Spawning shell within the initramfs"
fi
}