aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d/init.d
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:46:25 -0500
commit681717364c786083356ebe5d92c4cc6fd73af307 (patch)
tree7bb71eb44f50951cab5963849f7b0c10bb6dd031 /rc.d/init.d
parent2fd651f8a8b8df4a6e0ea335b3a040bf505ba12b (diff)
downloadinitscripts-681717364c786083356ebe5d92c4cc6fd73af307.tar
initscripts-681717364c786083356ebe5d92c4cc6fd73af307.tar.gz
initscripts-681717364c786083356ebe5d92c4cc6fd73af307.tar.bz2
initscripts-681717364c786083356ebe5d92c4cc6fd73af307.tar.xz
initscripts-681717364c786083356ebe5d92c4cc6fd73af307.zip
Allow for plymouth to enter non-LUKS passphrases (#621158, <redhat-bugzilla@camperquake.de>)
Diffstat (limited to 'rc.d/init.d')
-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 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