From 0bc6bd2faca8bdef79389a31ca822251d4efcc89 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 1256d10e..858bb043 100644 --- a/rc.d/init.d/functions +++ b/rc.d/init.d/functions @@ -781,10 +781,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