From fd83e8b1b162f4e918502b2976fee431af7cbfa9 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Fri, 3 Oct 2014 00:49:43 +0100 Subject: 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 --- scripts/functions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts/functions') 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 -- cgit v1.2.3