aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2009-03-20 17:01:51 -0400
committerBill Nottingham <notting@redhat.com>2009-03-20 17:02:37 -0400
commit7457cf7b21e70c2b6ca36337e36b9e32c9930bf3 (patch)
treeb8a58b3767563253f2304aa5dbf034c65775bf56
parent2c8287c9fb00e4fc7cc0235f8436c0bae0888cd7 (diff)
downloadinitscripts-7457cf7b21e70c2b6ca36337e36b9e32c9930bf3.tar
initscripts-7457cf7b21e70c2b6ca36337e36b9e32c9930bf3.tar.gz
initscripts-7457cf7b21e70c2b6ca36337e36b9e32c9930bf3.tar.bz2
initscripts-7457cf7b21e70c2b6ca36337e36b9e32c9930bf3.tar.xz
initscripts-7457cf7b21e70c2b6ca36337e36b9e32c9930bf3.zip
Catch the right return code from asking for the password. (#483269, <vladis.kletnieks@vt.edu>)
-rwxr-xr-xrc.d/rc.sysinit4
1 files changed, 3 insertions, 1 deletions
diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit
index 008a3497..06a0ed35 100755
--- a/rc.d/rc.sysinit
+++ b/rc.d/rc.sysinit
@@ -223,18 +223,20 @@ init_crypto() {
fi
if [ -n "$key" ]; then
/sbin/cryptsetup -d $key luksOpen "$src" "$dst" <&1 2>/dev/null && success || failure
+ rc=$?
else
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 luksOpen -T1 $src $dst" <&1
+ 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
fi
- rc=$?
if [ $rc -ne 0 ]; then
ret=1
continue