diff options
author | toni <matzeton@googlemail.com> | 2016-03-19 16:16:16 +0100 |
---|---|---|
committer | toni <matzeton@googlemail.com> | 2016-03-19 16:34:25 +0100 |
commit | 0c79886240b68ae9ed144cce5bd2167996859239 (patch) | |
tree | fb5327822009f296698b431b0f7be4b5a4ea67b7 | |
parent | fbd15154bea20f5b29e0d193b60f648891684f8a (diff) |
initscript old askpass fallback
-rwxr-xr-x | scripts/naskpass.initscript | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/scripts/naskpass.initscript b/scripts/naskpass.initscript index fa22318..5540667 100755 --- a/scripts/naskpass.initscript +++ b/scripts/naskpass.initscript @@ -290,7 +290,7 @@ setup_mapping() # Plymouth will add a : if it is a non-graphical prompt cryptkey="Please unlock disk $diskname" else - if [ -x /lib/cryptsetup/naskpass ]; then + if [ -x /lib/cryptsetup/naskpass ] && [ $askpass_fallback -eq 0 ]; then cryptkeyscript="/lib/cryptsetup/naskpass" cryptkey="" else @@ -302,7 +302,7 @@ setup_mapping() if [ ! -e "$NEWROOT" ]; then - if [ -x /bin/plymouth ] && plymouth --ping; then + if [ -x /bin/plymouth ] && plymouth --ping || [ $askpass_fallback -ne 0 ]; then message "naskpass does not work with playmouth, falling back to default askpass .." if ! crypttarget="$crypttarget" cryptsource="$cryptsource" \ $cryptkeyscript "$cryptkey" | $cryptopen; then @@ -383,6 +383,7 @@ setup_mapping() # # Do we have any kernel boot arguments? +askpass_fallback=0 cmdline_cryptopts='' unset cmdline_root for opt in $(cat /proc/cmdline); do @@ -406,6 +407,9 @@ for opt in $(cat /proc/cmdline); do *) # lilo major/minor number (See #398957). Ignore esac ;; + cryptfallback) + askpass_fallback=1 + ;; esac done |