Re: [PATCH] cryptroot-ask: check that plymouth is running before use

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am 10.03.2011 23:54, schrieb Andrey Borzenkov:
> Otherwise there is no way to skip pasword prompt. --has-active-vt
> seems to correctly catch also the case when plymouthd is started
> but splash is disabled.
> 
> Signed-off-by: Andrey Borzenkov <arvidjaar@xxxxxxxxx>
> 
> ---
>  modules.d/90crypt/cryptroot-ask.sh |    5 ++---
>  1 files changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/modules.d/90crypt/cryptroot-ask.sh b/modules.d/90crypt/cryptroot-ask.sh
> index 5150688..9c99ccc 100755
> --- a/modules.d/90crypt/cryptroot-ask.sh
> +++ b/modules.d/90crypt/cryptroot-ask.sh
> @@ -80,9 +80,8 @@ if [ -n "$(getarg rd.luks.key)" ]; then
>      rmdir "$mntp"
>      unset mntp keypath keydev
>  else
> -    # Prompt for password with plymouth, if installed.
> -    # Should we check if plymouthd is running?
> -    if [ -x /bin/plymouth ]; then
> +    # Prompt for password with plymouth, if installed and running.
> +    if [ -x /bin/plymouth ] && /bin/plymouth --has-active-vt; then
>          prompt="Password [$device ($luksname)]:" 
>          if [ ${#luksname} -gt 8 ]; then
>              sluksname=${sluksname##luks-}

Very nice! Thank you!
--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux