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:
parent
c33208660b
commit
e41839391d
@ -39,7 +39,9 @@ SAVED_ENTRY=`${GRUB_EDITENV} list | sed -ne "/^saved_entry=/{s@\"\(.*\)\"@\1@;t
|
|||||||
|
|
||||||
debug_print "SAVED_ENTRY=$SAVED_ENTRY"
|
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 '
|
MENU_ENTRIES=`awk '
|
||||||
BEGIN {
|
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"
|
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
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
IFS=$'\n'
|
IFS=$'\n'
|
||||||
for i in $MENU_ENTRIES; do
|
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"
|
run_command ${GRUB_SET_DEFAULT} "$NEW_SAVED_ENTRY"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
@ -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
|
Mon Feb 5 08:52:20 UTC 2018 - olaf@aepfle.de
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user