From fceb479402ad5928a3d8656bea77fe68baa57f95 Mon Sep 17 00:00:00 2001 From: oddlama Date: Sat, 25 Apr 2020 20:12:00 +0200 Subject: [PATCH] Fix bug in fstab generation --- scripts/main.sh | 2 +- scripts/utils.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/main.sh b/scripts/main.sh index a121f90..1056fea 100755 --- a/scripts/main.sh +++ b/scripts/main.sh @@ -220,7 +220,7 @@ install_kernel() { } add_fstab_entry() { - printf '%-46s %-24s %-6s %-96s %s' "$1" "$2" "$3" "$4" "$5" >> /etc/fstab \ + printf '%-46s %-24s %-6s %-96s %s\n' "$1" "$2" "$3" "$4" "$5" >> /etc/fstab \ || die "Could not append entry to fstab" } diff --git a/scripts/utils.sh b/scripts/utils.sh index 8428c8f..807f286 100644 --- a/scripts/utils.sh +++ b/scripts/utils.sh @@ -124,7 +124,7 @@ get_blkid_field_by_device() { local val val="$(blkid -o export "$device")" \ || die "Error while executing blkid '$device'" - val="$(grep -- "$blkid_field" <<< "$val")" \ + val="$(grep -- "^$blkid_field=" <<< "$val")" \ || die "Could not find $blkid_field=... in blkid output" val="${val#"$blkid_field="}" echo -n "$val"