aboutsummaryrefslogtreecommitdiff
path: root/rc.sysinit
diff options
context:
space:
mode:
authorHeiko Baums <heiko@baums-on-web.de>2010-12-06 16:16:12 +0100
committerTom Gundersen <teg@jklm.no>2010-12-06 16:16:12 +0100
commit418537326e0e0df5ab5b2eec42ae5e340ada00b5 (patch)
tree293a883d1fbf81306ab8295284b2e31de09db728 /rc.sysinit
parent392990639656d14db854aaf62d3a0a471c013111 (diff)
downloadinitscripts-418537326e0e0df5ab5b2eec42ae5e340ada00b5.tar.xz
cryptsetup: abort if LUKS is found on swap partition
Variable was not set before use, so the check for LUKS always failed. As noted, this could be dangerous. Signed-off-by: Tom Gundersen <teg@jklm.no>
Diffstat (limited to 'rc.sysinit')
-rwxr-xr-xrc.sysinit5
1 files changed, 4 insertions, 1 deletions
diff --git a/rc.sysinit b/rc.sysinit
index 53ce678..d9eddce 100755
--- a/rc.sysinit
+++ b/rc.sysinit
@@ -133,7 +133,10 @@ if [[ -f /etc/crypttab && $CS ]]; then
local open=create a="$1" b="$2" failed=0
# Ordering of options is different if you are using LUKS vs. not.
# Use ugly swizzling to deal with it.
- if $CS isLuks "$2"; then
+ # isLuks only gives an exit code but no output to stdout or stderr.
+ $CS isLuks "$2"
+ _isluks=$?
+ if [[ $_isluks ]]; then
open=luksOpen
a="$2"
b="$1"