From 23985b14531dab30732b743938b1b1d3ccdd314b Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Fri, 20 Mar 2009 17:01:51 -0400 Subject: Catch the right return code from asking for the password. (#483269, ) --- rc.d/rc.sysinit | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'rc.d') 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 -- cgit v1.2.1