1 From: Marcin Krol <hawk@tld-linux.org>
2 Date: Wed, 1 Mar 2023 00:57:42 +0000 (+0100)
3 Subject: - disable lock checks (happens on LUKS2 and fails during system boot)
4 X-Git-Url: https://git.tld-linux.org/?p=rc-scripts.git;a=commitdiff_plain;h=6066bc28dc8b40335ea2a4554691900fa6813c8a
6 - disable lock checks (happens on LUKS2 and fails during system boot)
9 diff --git a/rc.d/init.d/cryptsetup b/rc.d/init.d/cryptsetup
10 index 263a39c..d5ac2c3 100755
11 --- a/rc.d/init.d/cryptsetup
12 +++ b/rc.d/init.d/cryptsetup
13 @@ -105,7 +105,7 @@ init_crypto() {
17 - if /sbin/cryptsetup isLuks "$src" 2>/dev/null; then
18 + if /sbin/cryptsetup --disable-locks isLuks "$src" 2>/dev/null; then
19 if key_is_random "$key"; then
20 nls "%s: LUKS requires non-random key, skipping" "$dst"
22 @@ -114,7 +114,7 @@ init_crypto() {
23 if [ -n "$params" ]; then
24 nls "%s: options are invalid for LUKS partitions, ignoring them" "$dst"
26 - /sbin/cryptsetup ${key:+-d $key} luksOpen "$src" "$dst" <&1
27 + /sbin/cryptsetup --disable-locks ${key:+-d $key} luksOpen "$src" "$dst" <&1
30 if [ $rc -ne 0 ]; then
31 @@ -144,7 +144,7 @@ halt_crypto() {
32 [ -z "$dst" -o "${dst#\#}" != "$dst" ] && continue
33 if [ -b "/dev/mapper/$dst" ]; then
34 if LC_ALL=C /sbin/dmsetup info "$dst" | grep -q '^Open count: *0$'; then
35 - /sbin/cryptsetup remove "$dst"
36 + /sbin/cryptsetup --disable-locks remove "$dst"