genfstab: correctly trim root prefix on swapfiles
We remove the root prefix for all other devices by design, but omitted doing so for swapfiles. Fixes FS#63069
This commit is contained in:
parent
c7fb67064a
commit
4eb54af72a
@ -220,7 +220,7 @@ done
|
||||
[[ $device = *'\040(deleted)' ]] && continue
|
||||
|
||||
if [[ $type = file ]]; then
|
||||
printf '%-20s' "$device"
|
||||
printf '%-20s' "${device#${root%/}}"
|
||||
elif [[ $device = /dev/dm-+([0-9]) ]]; then
|
||||
# device mapper doesn't allow characters we need to worry
|
||||
# about being mangled, and it does the escaping of dashes
|
||||
|
Loading…
Reference in New Issue
Block a user