From 87af1cba3c26bc7840d143e2b940f372431e41d9 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 9 Nov 2011 10:18:58 +0100 Subject: [PATCH] 50plymouth/plymouth-pretrigger.sh: respect primary console setting The kernel's primary console device is determined by the last "console=" argument on the kernel command line. This setting should be respected by dracut-generated initial RAM disks. Steps to Reproduce: (Easiest using a KVM VM, virt-manager and "virsh console") 1. Boot with a kernel command line ending in console=tty0 console=ttyS0,115200 2. Observe both tty0 and ttyS0. The output of init scripts is sent to ttyS0, as the final "console=" argument determines the primary console device as per Documentation/serial-console.txt in the kernel sources. https://bugzilla.redhat.com/show_bug.cgi?id=752073 --- modules.d/50plymouth/plymouth-pretrigger.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules.d/50plymouth/plymouth-pretrigger.sh b/modules.d/50plymouth/plymouth-pretrigger.sh index 534948e3..57955e71 100755 --- a/modules.d/50plymouth/plymouth-pretrigger.sh +++ b/modules.d/50plymouth/plymouth-pretrigger.sh @@ -18,7 +18,9 @@ if getargbool 1 plymouth.enable && getargbool 1 rd.plymouth -n rd_NO_PLYMOUTH; t info "Starting plymouth daemon" mkdir -m 0755 /run/plymouth - [ -x /lib/udev/console_init ] && /lib/udev/console_init /dev/tty0 + consoledev=$(getarg console= | sed -e 's/,.*//') + consoledev=${consoledev:-tty0} + [ -x /lib/udev/console_init ] && /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