output everything to /dev/kmesg and add dmesg for the emergency_shell
authorHarald Hoyer <harald@redhat.com>
Fri, 3 Jul 2009 09:09:33 +0000 (11:09 +0200)
committerHarald Hoyer <harald@redhat.com>
Fri, 3 Jul 2009 10:34:51 +0000 (12:34 +0200)
modules.d/99base/init
modules.d/99base/install

index 701706d..b49ba21 100755 (executable)
@@ -7,6 +7,8 @@
 
 emergency_shell()
 {
+    exec >/dev/console 2>&1 </dev/console
+    getarg rdinitdebug || dmesg
     source_all emergency
     echo ; echo
     echo "Bug in initramfs /init detected. Dropping to a shell. Good luck!"
@@ -64,7 +66,12 @@ if [ ! -c /dev/ptmx ]; then
     fi
 fi
 
-getarg rdinitdebug && set -x
+if getarg rdinitdebug; then
+    set -x
+else
+    exec >/dev/kmsg 2>&1
+fi
+
 mkdir /dev/shm
 mkdir /dev/pts
 mount -t devpts -o gid=5,mode=620 /dev/pts /dev/pts >/dev/null 2>&1
index ff15200..4ecba9c 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/bash
-dracut_install mount mknod mkdir modprobe pidof sleep chroot sed ls flock cp mv
+dracut_install mount mknod mkdir modprobe pidof sleep chroot sed ls flock cp mv dmesg 
 if [ ! -e "${initdir}/bin/sh" ]; then
     dracut_install bash
     (ln -s bash "${initdir}/bin/sh" || :)