summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2013-11-08 13:44:12 +0200
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2013-11-08 13:50:12 +0200
commitd19a4a20534418d990298ec198dcd973a5587736 (patch)
treef935455d011441bc40d36f72dacfb3081deab453
parenta2a3e7ab04e81128cef4252f1ff8d1a3760db82a (diff)
downloadsetup-efi-ivi-accepted/tizen_ivi.tar.gz
setup-efi-ivi-accepted/tizen_ivi.tar.bz2
setup-efi-ivi-accepted/tizen_ivi.zip
The 'setup-gummiboot-conf' script does not handle commented-out default entreis ("# default"). The reason is that the corresponding regexp was incorrect, because it did not searh from the beginning of the line, because of missing "^" symbol. This patch fixes the problem. Change-Id: I0bc8cd92bba127fcbea3908046c3bc209fbf02d1 Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
-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