]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
90crypt: ask_for_password pings plymouthd
authorAmadeusz Żołnowski <aidecoe@aidecoe.name>
Thu, 18 Aug 2011 13:55:57 +0000 (15:55 +0200)
committerHarald Hoyer <harald@redhat.com>
Fri, 19 Aug 2011 13:18:04 +0000 (15:18 +0200)
If plymouthd is not started, ask_for_password shouldn't try to prompt
for password with GUI and should use text prompt instead.

modules.d/90crypt/crypt-lib.sh

index 2797a7a24131aa9bdcb88c940a483d14baf428a4..69f14d0f8b59bad96d75bf9b88bfa5a9faa663e5 100755 (executable)
@@ -47,7 +47,7 @@ ask_for_password() {
 
     { flock -s 9;
         # Prompt for password with plymouth, if installed and running.
-        if [ -x /bin/plymouth ]; then
+        if [ -x /bin/plymouth ] && /bin/plymouth --ping; then
             /bin/plymouth ask-for-password \
                 --prompt "$ply_prompt" --number-of-tries=$ply_tries \
                 --command="$ply_cmd"