Skip to content

Commit

Permalink
genfstab: ensure swap devices adhere to -f
Browse files Browse the repository at this point in the history
Signed-off-by: Morten Linderud <[email protected]>
  • Loading branch information
Foxboron committed May 26, 2023
1 parent 8ef9090 commit a5b772d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions genfstab.in
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,9 @@ done < <(findmnt -Recvruno SOURCE,TARGET,FSTYPE,OPTIONS,FSROOT "$root")
# skip files marked deleted by the kernel
[[ $device = *'\040(deleted)' ]] && continue

# skip devices not part of the prefix
[[ $device = "$prefixfilter"* ]] || continue

if [[ $type = file ]]; then
printf '%-20s' "${device#${root%/}}"
elif [[ $device = /dev/dm-+([0-9]) ]]; then
Expand Down

0 comments on commit a5b772d

Please sign in to comment.