mkinitrd unification across distributions
 help / color / mirror / Atom feed
* [PATCH] Run plymouth only if on a normal console
@ 2011-05-25 10:26 Andreas Thienemann
       [not found] ` <Pine.LNX.4.58.1105251221110.7357-bvJ793YqIODNUDpmljszgg@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Andreas Thienemann @ 2011-05-25 10:26 UTC (permalink / raw)
  To: initramfs-u79uwXL29TY76Z2rM5mHXA


Run plymouth only when running on a normal console. When the machine is 
using a serial console or braille terminal etc. do not start plymouth.

That will give people the ability to type in crypto passphrases etc. on a 
serial terminal.

---
 modules.d/50plymouth/plymouth-pretrigger.sh |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/modules.d/50plymouth/plymouth-pretrigger.sh b/modules.d/50plymouth/plymouth-pretrigger.sh
index 25ed06f..d3c8a2a 100755
--- a/modules.d/50plymouth/plymouth-pretrigger.sh
+++ b/modules.d/50plymouth/plymouth-pretrigger.sh
@@ -2,7 +2,18 @@
 # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
 # ex: ts=8 sw=4 sts=4 et filetype=sh
 
-if getargbool 1 rd.plymouth -n rd_NO_PLYMOUTH; then
+# Check for normal console
+is_normal_console() {
+    for con in $(getargs console); do
+        case $con in
+            tty[0..9]) continue;;
+            *) return 1;;
+        esac
+    done
+    return 0
+}
+
+if getargbool 1 rd.plymouth -n rd_NO_PLYMOUTH && is_normal_console; then
     [ -c /dev/null ] || mknod -m 0666 /dev/null c 1 3
     # first trigger graphics subsystem
     udevadm trigger --action=add --attr-match=class=0x030000 >/dev/null 2>&1
-- 
1.7.4.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-05-25 11:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-25 10:26 [PATCH] Run plymouth only if on a normal console Andreas Thienemann
     [not found] ` <Pine.LNX.4.58.1105251221110.7357-bvJ793YqIODNUDpmljszgg@public.gmane.org>
2011-05-25 11:36   ` Harald Hoyer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox