From ae3ecffbd2e40760fef5dc09db30ea8a81abec70 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 26 Aug 2024 12:33:11 +0200 Subject: Merging upstream version 103. Signed-off-by: Daniel Baumann --- modules.d/90crypt/crypt-lib.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'modules.d/90crypt/crypt-lib.sh') 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 -- cgit v1.2.3