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
commitae3ecffbd2e40760fef5dc09db30ea8a81abec70 (patch)
treef3b77bfda1bae06d3326ef27c3cb61539e7f93cc /modules.d/90crypt/crypt-lib.sh
parentAdding debian version 102-3. (diff)
downloaddracut-ae3ecffbd2e40760fef5dc09db30ea8a81abec70.tar.xz
dracut-ae3ecffbd2e40760fef5dc09db30ea8a81abec70.zip
Merging upstream version 103.
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