]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
plymouth/plymouth-pretrigger.sh: check for tty dev existence
authorHarald Hoyer <harald@redhat.com>
Mon, 7 May 2012 14:28:16 +0000 (16:28 +0200)
committerHarald Hoyer <harald@redhat.com>
Mon, 7 May 2012 14:28:16 +0000 (16:28 +0200)
modules.d/50plymouth/plymouth-pretrigger.sh

index 50828af2c12c28cdcd3c0dabe127b1a8be140a4e..8fa0aecf24f80ae4349b30ffadf7be898cd98feb 100755 (executable)
@@ -21,10 +21,10 @@ if [ -x /bin/plymouthd ]; then
         mkdir -m 0755 /run/plymouth
         consoledev=$(getarg console= | sed -e 's/,.*//')
         consoledev=${consoledev:-tty0}
-        [ -x /lib/udev/console_init ] && /lib/udev/console_init "/dev/$consoledev"
+        [ -x /lib/udev/console_init -a -e "/dev/$consoledev" ] && /lib/udev/console_init "/dev/$consoledev"
         [ -x /bin/plymouthd ] && /bin/plymouthd --attach-to-session --pid-file /run/plymouth/pid
         /bin/plymouth --show-splash 2>&1 | vinfo
         # reset tty after plymouth messed with it
-        [ -x /lib/udev/console_init ] && /lib/udev/console_init /dev/tty0
+        [ -x /lib/udev/console_init -a -e "/dev/$consoledev" ] && /lib/udev/console_init "/dev/$consoledev"
     fi
 fi