aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d
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:01:51 -0400
commit23985b14531dab30732b743938b1b1d3ccdd314b (patch)
tree6fe5a5a4c48ae7ff07cfb43d082dfa77453bc9f8 /rc.d
parent747f8b92dd141b4ebe894d211e0500d3330cb84e (diff)
downloadinitscripts-23985b14531dab30732b743938b1b1d3ccdd314b.tar
initscripts-23985b14531dab30732b743938b1b1d3ccdd314b.tar.gz
initscripts-23985b14531dab30732b743938b1b1d3ccdd314b.tar.bz2
initscripts-23985b14531dab30732b743938b1b1d3ccdd314b.tar.xz
initscripts-23985b14531dab30732b743938b1b1d3ccdd314b.zip
Catch the right return code from asking for the password. (#483269, <vladis.kletnieks@vt.edu>)
Diffstat (limited to 'rc.d')
-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 dda85d7b..65bf678e 100755
--- a/rc.d/rc.sysinit
+++ b/rc.d/rc.sysinit
@@ -221,18 +221,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