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 <arvidjaar@gmail.com>
This commit is contained in:
Andrey Borzenkov 2011-03-11 01:54:04 +03:00 committed by Harald Hoyer
parent b151c3b1fe
commit 96d1d01572

View File

@ -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-}