From: Andrey Borzenkov Date: Thu, 10 Mar 2011 22:54:04 +0000 (+0300) Subject: cryptroot-ask: check that plymouth is running before use X-Git-Tag: 009~56 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=96d1d015725029976c8f02c9fd472ee875373b13;p=thirdparty%2Fdracut.git cryptroot-ask: check that plymouth is running before use 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 --- diff --git a/modules.d/90crypt/cryptroot-ask.sh b/modules.d/90crypt/cryptroot-ask.sh index 5150688d5..9c99ccccd 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-}