Skip to content

Commit

Permalink
mount-helper: fix getting btrfs devices
Browse files Browse the repository at this point in the history
  • Loading branch information
balupton committed Aug 23, 2023
1 parent 9b89343 commit 8278925
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion commands/mount-helper
Original file line number Diff line number Diff line change
Expand Up @@ -942,7 +942,7 @@ function mount_helper() (
# verify
# use [echo-first-line] as when multiple devices are on a btrfs filesystem, they all share the same UUID and LABEL
# use --mounted then --no-mounted to prefer the node of the filesystem which is actually mounted
temp="$(get-devices --result=node --mounted --node="$option_share" --filesystem="$mount_type" --label="$option_label" --count="$option_count" | echo-first-line)"
temp="$(get-devices --result=node --mounted --node="$option_share" --filesystem="$mount_type" --label="$option_label" --count="$option_count" | echo-first-line || :)"
if test -z "$temp"; then
temp="$(get-devices --result=node --no-mounted --node="$option_share" --filesystem="$mount_type" --label="$option_label" --count="$option_count" | echo-first-line)"
fi
Expand Down

0 comments on commit 8278925

Please sign in to comment.