diff options
author | Ben Hutchings <ben@decadent.org.uk> | 2014-10-03 00:49:43 +0100 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2014-10-03 03:20:13 +0100 |
commit | fd83e8b1b162f4e918502b2976fee431af7cbfa9 (patch) | |
tree | 21b0e42fcea8ab2ac4e21e675a2e453dc403c56d /scripts/functions | |
parent | 782d1665d2cfd3ea70a97dea9fc2e417c5bb9759 (diff) |
panic: Do not return if reboot fails
The panic function may be called from several places in the init
script, not just at the end. In some cases, the calling function will
retry an action when it returns; for example, booting with
'root=/dev/nonexistent panic=1' currently leads to an infinite series
of error messages.
In order to trigger a kernel panic reliably, we must use exit rather
than return.
Related-to: #751488
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'scripts/functions')
-rw-r--r-- | scripts/functions | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/functions b/scripts/functions index 11e8a10..16b5187 100644 --- a/scripts/functions +++ b/scripts/functions @@ -43,7 +43,7 @@ panic() echo "Rebooting automatically due to panic= boot argument" sleep ${panic} reboot - return + exit # in case reboot fails, force kernel panic fi modprobe -v i8042 || true modprobe -v atkbd || true |