summaryrefslogtreecommitdiffstats
path: root/modules.d/90crypt/crypt-lib.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-26 10:33:11 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-26 10:33:11 +0000
commit203af7302854f453fa4a05ecefd4403b6c8a4f8d (patch)
tree967fdacafe332baabd12b57725505c138d0f3bbf /modules.d/90crypt/crypt-lib.sh
parentAdding upstream version 102. (diff)
downloaddracut-203af7302854f453fa4a05ecefd4403b6c8a4f8d.tar.xz
dracut-203af7302854f453fa4a05ecefd4403b6c8a4f8d.zip
Adding upstream version 103.upstream/103upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'modules.d/90crypt/crypt-lib.sh')
-rwxr-xr-xmodules.d/90crypt/crypt-lib.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules.d/90crypt/crypt-lib.sh b/modules.d/90crypt/crypt-lib.sh
index f3ba20d..7669828 100755
--- a/modules.d/90crypt/crypt-lib.sh
+++ b/modules.d/90crypt/crypt-lib.sh
@@ -148,7 +148,7 @@ test_dev() {
local mount_point
mount_point=$(mkuniqdir /mnt testdev)
- [ -n "$dev" -a -n "$*" ] || return 1
+ [ -n "$dev" ] && [ -n "$*" ] || return 1
[ -d "$mount_point" ] || die 'Mount point does not exist!'
if mount -r "$dev" "$mount_point" > /dev/null 2>&1; then
@@ -175,7 +175,7 @@ test_dev() {
# match_dev UUID=123 /dev/dm-1
# Returns true if /dev/dm-1 UUID starts with "123".
match_dev() {
- [ -z "$1" -o "$1" = '*' ] && return 0
+ [ -z "$1" ] || [ "$1" = '*' ] && return 0
local devlist
local dev
@@ -206,7 +206,7 @@ getkey() {
local key_dev
local key_path
- [ -z "$keys_file" -o -z "$for_dev" ] && die 'getkey: wrong usage!'
+ [ -z "$keys_file" ] || [ -z "$for_dev" ] && die 'getkey: wrong usage!'
[ -f "$keys_file" ] || return 1
while IFS=: read -r luks_dev key_dev key_path _ || [ -n "$luks_dev" ]; do