Loading a kernel can crash the system so it is useful that the user
sees which module might be causing trouble.

Signed-off-by: Timo Juhani Lindfors <[email protected]>

diff --git a/scripts/functions b/scripts/functions
index 579696a..af49e45 100644
--- a/scripts/functions
+++ b/scripts/functions
@@ -31,6 +31,12 @@ log_end_msg()
        _log_msg "done.\n"
 }
 
+try_modprobe()
+{
+       echo "Attempting to load kernel module $1"
+       modprobe $1
+}
+
 panic()
 {
        if command -v chvt >/dev/null 2>&1; then
@@ -44,8 +50,8 @@ panic()
                sleep ${panic}
                reboot
        fi
-       modprobe i8042
-       modprobe atkbd
+       try_modprobe i8042
+       try_modprobe atkbd
        REASON="$@" PS1='(initramfs) ' /bin/sh -i </dev/console >/dev/console 
2>&1
 }
 
-- 
1.7.2.3


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]
Archive: 
http://lists.debian.org/[email protected]

Reply via email to