From 4eb54af72a30443738683a13906c7aa2f4494112 Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Tue, 2 Jul 2019 11:20:33 -0400 Subject: [PATCH] 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 --- genfstab.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/genfstab.in b/genfstab.in index b8220ea..c626290 100644 --- a/genfstab.in +++ b/genfstab.in @@ -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