summaryrefslogtreecommitdiff
path: root/setup-gummiboot-conf
diff options
context:
space:
mode:
Diffstat (limited to 'setup-gummiboot-conf')
-rwxr-xr-xsetup-gummiboot-conf4
1 files changed, 2 insertions, 2 deletions
diff --git a/setup-gummiboot-conf b/setup-gummiboot-conf
index 5a84ad9..19d0054 100755
--- a/setup-gummiboot-conf
+++ b/setup-gummiboot-conf
@@ -62,7 +62,7 @@ entries="$(ls -1 "$entries_dir" | sed -e 's/\.conf$//g' | sort -r)"
fatal "no gummiboot entries found in \"$entries_dir\""
# Get the default entry name
-default_entry="$(cat "$conf_file" | sed -n -e 's/[ \t]*default[ \t]\+\(.\+\)[ \t]*/\1.conf/p')"
+default_entry="$(cat "$conf_file" | sed -n -e 's/^[ \t]*default[ \t]\+\(.\+\)[ \t]*/\1.conf/p')"
[ -n "$default_entry" ] || \
fatal "cannot find the default entry in \"$conf_file\""
[ "$(printf "%s\n" "$default_entry" | wc -l)" -eq "1" ] || \
@@ -98,7 +98,7 @@ done
# Update the default entry
newest_kernel="$(printf "%s" "$kernels" | head -n1)"
-sed -i -e "s/[ \t]*default[ \t]\+.*/default $newest_kernel/" "$conf_file"
+sed -i -e "s/^[ \t]*default[ \t]\+.*/default $newest_kernel/" "$conf_file"
# Remove gummiboot entries for non-existing kernels
printf "%s\n" "$entries" | while IFS= read -r entry; do