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"