From 681717364c786083356ebe5d92c4cc6fd73af307 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Mon, 28 Feb 2011 14:46:25 -0500 Subject: Allow for plymouth to enter non-LUKS passphrases (#621158, ) --- rc.d/init.d/functions | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'rc.d/init.d/functions') diff --git a/rc.d/init.d/functions b/rc.d/init.d/functions index 3f2cbc50..3eddf1ea 100644 --- a/rc.d/init.d/functions +++ b/rc.d/init.d/functions @@ -786,10 +786,16 @@ init_crypto() { rc=$? fi else - [ -z "$key" ] && plymouth --hide-splash - /sbin/cryptsetup $params ${key:+-d $key} create "$dst" "$src" <&1 2>/dev/null && success || failure - rc=$? - [ -z "$key" ] && plymouth --show-splash + if [ -z "$key" ]; then + mount_point="$(find_crypto_mount_point $dst)" + [ -n "$mount_point" ] || mount_point=${src##*/} + prompt=$(printf $"%s is password protected" "$mount_point") + plymouth ask-for-password --prompt "$prompt" --command="/sbin/cryptsetup $params create $dst $src" <&1 + rc=$? + else + /sbin/cryptsetup $params ${key:+-d $key} create "$dst" "$src" <&1 2>/dev/null && success || failure + rc=$? + fi fi if [ $rc -ne 0 ]; then ret=1 -- cgit v1.2.1