]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
cryptroot-ask: check that plymouth is running before use
authorAndrey Borzenkov <arvidjaar@gmail.com>
Thu, 10 Mar 2011 22:54:04 +0000 (01:54 +0300)
committerHarald Hoyer <harald@redhat.com>
Fri, 11 Mar 2011 08:43:44 +0000 (09:43 +0100)
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@gmail.com>
modules.d/90crypt/cryptroot-ask.sh

index 5150688d5ff2175866a590908cb8fb88fc3f98ec..9c99ccccd247c0073bf21dfc5c503f4e8b07c6f5 100755 (executable)
@@ -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-}