mkinitrd unification across distributions
 help / color / mirror / Atom feed
From: Harald Hoyer <harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Andreas Thienemann <andreas-XTk7JcP0uDNeoWH0uzbU5w@public.gmane.org>
Cc: initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] Run plymouth only if on a normal console
Date: Wed, 25 May 2011 13:36:44 +0200	[thread overview]
Message-ID: <4DDCE9CC.8040901@redhat.com> (raw)
In-Reply-To: <Pine.LNX.4.58.1105251221110.7357-bvJ793YqIODNUDpmljszgg@public.gmane.org>

Am 25.05.2011 12:26, schrieb Andreas Thienemann:
>
> 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


Does it also work if you check /sys/class/tty/console/active for tty0 
instead?

      parent reply	other threads:[~2011-05-25 11:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4DDCE9CC.8040901@redhat.com \
    --to=harald-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
    --cc=andreas-XTk7JcP0uDNeoWH0uzbU5w@public.gmane.org \
    --cc=initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox