Browse Source

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>
master
Andrey Borzenkov 14 years ago committed by Harald Hoyer
parent
commit
96d1d01572
  1. 5
      modules.d/90crypt/cryptroot-ask.sh

5
modules.d/90crypt/cryptroot-ask.sh

@ -80,9 +80,8 @@ if [ -n "$(getarg rd.luks.key)" ]; then
rmdir "$mntp" rmdir "$mntp"
unset mntp keypath keydev unset mntp keypath keydev
else else
# Prompt for password with plymouth, if installed. # Prompt for password with plymouth, if installed and running.
# Should we check if plymouthd is running? if [ -x /bin/plymouth ] && /bin/plymouth --has-active-vt; then
if [ -x /bin/plymouth ]; then
prompt="Password [$device ($luksname)]:" prompt="Password [$device ($luksname)]:"
if [ ${#luksname} -gt 8 ]; then if [ ${#luksname} -gt 8 ]; then
sluksname=${sluksname##luks-} sluksname=${sluksname##luks-}

Loading…
Cancel
Save