aboutsummaryrefslogtreecommitdiff
path: root/functions
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2012-07-17 16:36:47 +0200
committerTom Gundersen <teg@jklm.no>2012-07-17 16:42:37 +0200
commitc1055b68263e5f1b79d7b92ad79d375e224ef076 (patch)
tree342283bc7b05567e99bdf605c136120b888d9ce2 /functions
parent804addbf1640438f15229fafa296f49513eb932a (diff)
downloadinitscripts-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--functions4
1 files changed, 2 insertions, 2 deletions
diff --git a/functions b/functions
index 3798b79..794766c 100644
--- a/functions
+++ b/functions
@@ -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