summaryrefslogtreecommitdiff
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
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.
-rw-r--r--debian/changelog3
-rw-r--r--initramfs-tools.84
-rw-r--r--scripts/functions5
3 files changed, 8 insertions, 4 deletions
diff --git a/debian/changelog b/debian/changelog
index c37028a..91f7ec9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,11 +4,12 @@ initramfs-tools (0.90) UNRELEASED; urgency=low
* hook-functions: Fix xen i386 boots with optimized 2.5. (closes: 420754)
Thanks Marco Nenciarini <mnencia@debian.org> for patch.
* debian/control: Bump dep on klibc-utils from etch. (closes: 435031)
+ * scripts/functions: Implement non-zero panic bootarg.
[ David Härdeman ]
* hook-functions: Protect all variable with local, plus coding style fixes.
- -- maximilian attems <maks@debian.org> Sat, 28 Jul 2007 19:03:35 +0200
+ -- maximilian attems <maks@debian.org> Tue, 07 Aug 2007 01:18:25 +0200
initramfs-tools (0.89) unstable; urgency=low
diff --git a/initramfs-tools.8 b/initramfs-tools.8
index be4de54..3708575 100644
--- a/initramfs-tools.8
+++ b/initramfs-tools.8
@@ -1,4 +1,4 @@
-.TH INITRAMFS-TOOLS 8 "Date: 2007/04/09" "" "mkinitramfs script overview"
+.TH INITRAMFS-TOOLS 8 "Date: 2007/07/07" "" "mkinitramfs script overview"
.SH NAME
initramfs-tools \- an introduction to writing scripts for mkinitramfs
@@ -96,7 +96,7 @@ Use blacklist=module1,module2,module3 bootparameter.
.TP
\fB \fI panic
-sets an timeout on panic. Currently only zero value supported.
+sets an timeout on panic.
.TP
\fB \fI debug
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
}