diff options
Diffstat (limited to 'abs/core/plymouth/encrypt_hook')
-rw-r--r-- | abs/core/plymouth/encrypt_hook | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/abs/core/plymouth/encrypt_hook b/abs/core/plymouth/encrypt_hook index 11db344..a3dcda1 100644 --- a/abs/core/plymouth/encrypt_hook +++ b/abs/core/plymouth/encrypt_hook @@ -1,4 +1,4 @@ -#!/usr/bin/ash +#!/bin/bash run_hook() { modprobe -a -q dm-crypt >/dev/null 2>&1 @@ -74,13 +74,10 @@ EOF fi # Ask for a passphrase if [ ${dopassphrase} -gt 0 ]; then - echo "" + echo echo "A password is required to access the ${cryptname} volume:" - - #loop until we get a real password - while ! eval cryptsetup luksOpen ${resolved} ${cryptname} ${cryptargs} ${CSQUIET}; do - sleep 2; - done + plymouth ask-for-password --prompt="Password for ${cryptname} volume" --dont-pause-progress --number-of-tries=5 --command="/sbin/cryptsetup luksOpen --key-file=- ${cryptdev} ${cryptname} ${CSQUIET}" + sleep 2 fi if [ -e "/dev/mapper/${cryptname}" ]; then if [ ${DEPRECATED_CRYPT} -eq 1 ]; then @@ -135,5 +132,3 @@ EOF fi rm -f ${ckeyfile} } - -# vim: set ft=sh ts=4 sw=4 et: |