diff options
author | Heiko Baums <heiko@baums-on-web.de> | 2010-12-06 16:16:12 +0100 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2010-12-06 16:16:12 +0100 |
commit | 418537326e0e0df5ab5b2eec42ae5e340ada00b5 (patch) | |
tree | 293a883d1fbf81306ab8295284b2e31de09db728 | |
parent | 392990639656d14db854aaf62d3a0a471c013111 (diff) | |
download | initscripts-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>
-rwxr-xr-x | rc.sysinit | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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" |