SHA256
1
0
forked from pool/grub2

Accepting request 573265 from home:michael-chang:branches:Base:System

- Fix unquoted string error and add some more checks (bsc#1079330) 
  * grub2-check-default.sh

OBS-URL: https://build.opensuse.org/request/show/573265
OBS-URL: https://build.opensuse.org/package/show/Base:System/grub2?expand=0&rev=289
This commit is contained in:
Michael Chang 2018-02-07 07:15:22 +00:00 committed by Git OBS Bridge
parent c33208660b
commit e41839391d
2 changed files with 11 additions and 3 deletions

View File

@ -39,7 +39,9 @@ SAVED_ENTRY=`${GRUB_EDITENV} list | sed -ne "/^saved_entry=/{s@\"\(.*\)\"@\1@;t
debug_print "SAVED_ENTRY=$SAVED_ENTRY"
[ -z "$SAVED_ENTRY" ] && exit 0
if [ -z "$SAVED_ENTRY" ] || expr match "$SAVED_ENTRY" "^[0-9]\+$" >/dev/null; then
exit 0
fi
MENU_ENTRIES=`awk '
BEGIN {
@ -103,13 +105,13 @@ NEW_SAVED_ENTRY=`echo $SAVED_ENTRY | sed -ne "s/$NAME [0-9a-zA-Z_.-]\\+/$NAME $V
debug_print "NEW_SAVED_ENTRY=$NEW_SAVED_ENTRY"
if [ "$NEW_SAVED_ENTRY" = "$SAVED_ENTRY" ]; then
if [ -z "$NEW_SAVED_ENTRY" -o "$NEW_SAVED_ENTRY" = "$SAVED_ENTRY" ]; then
exit 0
fi
IFS=$'\n'
for i in $MENU_ENTRIES; do
if [ $NEW_SAVED_ENTRY = $i ]; then
if [ "$NEW_SAVED_ENTRY" = "$i" ]; then
run_command ${GRUB_SET_DEFAULT} "$NEW_SAVED_ENTRY"
exit 0
fi

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue Feb 6 09:44:26 UTC 2018 - mchang@suse.com
- Fix unquoted string error and add some more checks (bsc#1079330)
* grub2-check-default.sh
-------------------------------------------------------------------
Mon Feb 5 08:52:20 UTC 2018 - olaf@aepfle.de