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 <timo.lindf...@iki.fi>

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 debian-kernel-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/1299068122-27954-1-git-send-email-timo.lindf...@iki.fi

Reply via email to