diff options
author | Tom Gundersen <teg@jklm.no> | 2012-07-17 16:36:47 +0200 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2012-07-17 16:42:37 +0200 |
commit | c1055b68263e5f1b79d7b92ad79d375e224ef076 (patch) | |
tree | 342283bc7b05567e99bdf605c136120b888d9ce2 /functions | |
parent | 804addbf1640438f15229fafa296f49513eb932a (diff) | |
download | initscripts-c1055b68263e5f1b79d7b92ad79d375e224ef076.tar.xz |
cryptsetup: negate a wrong check2012.07.2
blkid returns 2 when nothing is found on the device, which is exactly when we want to
use it.
Signed-off-by: Tom Gundersen <teg@jklm.no>
Diffstat (limited to 'functions')
-rw-r--r-- | functions | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -462,13 +462,13 @@ do_unlock_systemd() { if IFS=, in_array swap ${options[@]}; then # create swap on the device only if no fs signature exists blkid -p "$2" &>/dev/null - if (( $? == 2 )) || ! mkswap /dev/mapper/$name >/dev/null; then + if (( $? != 2 )) || ! mkswap /dev/mapper/$name >/dev/null; then failed=1 fi elif IFS=, in_array tmp ${options[@]}; then # create fs on the device only if no fs signature exists blkid -p "$2" &>/dev/null - if (( $? == 2 )) || ! mke2fs /dev/mapper/$name >/dev/null; then + if (( $? != 2 )) || ! mke2fs /dev/mapper/$name >/dev/null; then failed=1 fi fi |