diff options
author | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2013-11-08 13:44:12 +0200 |
---|---|---|
committer | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2013-11-08 13:50:12 +0200 |
commit | d19a4a20534418d990298ec198dcd973a5587736 (patch) | |
tree | f935455d011441bc40d36f72dacfb3081deab453 | |
parent | a2a3e7ab04e81128cef4252f1ff8d1a3760db82a (diff) | |
download | setup-efi-ivi-d19a4a20534418d990298ec198dcd973a5587736.tar.gz setup-efi-ivi-d19a4a20534418d990298ec198dcd973a5587736.tar.bz2 setup-efi-ivi-d19a4a20534418d990298ec198dcd973a5587736.zip |
setup-gummitoot-conf: handle commented-out default entriesHEADtizen_3.0.m14.2_ivi_releasesubmit/tizen_ivi_stable/20131119.035428submit/tizen_ivi_stable/20131119.033328submit/tizen_ivi_panda/20140403.012230submit/tizen/20131108.115107accepted/tizen_ivi_stable/20131119.040312accepted/tizen/ivi/panda/20140403.015816accepted/tizen/20131111.231301accepted/tizen/20131108.201436tizen_ivi_pandatizen_3.0.m14.2_ivitizenaccepted/tizen_ivi_pandaaccepted/tizen_iviaccepted/tizen/ivi
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-x | setup-gummiboot-conf | 4 |
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 |