From e23c0a34f51d053357fd6c171cd8edfd38bc3df0 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Tue, 7 Aug 2007 01:19:38 +0200 Subject: scripts/functions: Implement non-zero panic boot arg sleep the passed time and then call reboot. works as arg can only be numeric. --- scripts/functions | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'scripts/functions') 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 } -- cgit v1.2.3