aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2011-02-28 14:46:25 -0500
committerBill Nottingham <notting@redhat.com>2011-02-28 14:47:39 -0500
commit0bc6bd2faca8bdef79389a31ca822251d4efcc89 (patch)
treef70317e7ef21e01bcbfba95ea127eb0ea5c9dc76
parent72945399791a02e831bcfb3e9914d5e3ee8a5ad5 (diff)
downloadinitscripts-0bc6bd2faca8bdef79389a31ca822251d4efcc89.tar
initscripts-0bc6bd2faca8bdef79389a31ca822251d4efcc89.tar.gz
initscripts-0bc6bd2faca8bdef79389a31ca822251d4efcc89.tar.bz2
initscripts-0bc6bd2faca8bdef79389a31ca822251d4efcc89.tar.xz
initscripts-0bc6bd2faca8bdef79389a31ca822251d4efcc89.zip
Allow for plymouth to enter non-LUKS passphrases (#621158, <redhat-bugzilla@camperquake.de>)
-rw-r--r--rc.d/init.d/functions14
1 files changed, 10 insertions, 4 deletions
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