Accepting request 390640 from home:michael-chang:branches:Base:System
- Correct show user defined comments in menu for snapshots (bsc#956698) * modified grub2-snapper-plugin.sh OBS-URL: https://build.opensuse.org/request/show/390640 OBS-URL: https://build.opensuse.org/package/show/Base:System/grub2?expand=0&rev=211
This commit is contained in:
parent
4051ae3843
commit
ffd714d7a6
@ -70,13 +70,13 @@ snapshot_submenu () {
|
||||
# FATE#318101
|
||||
# Show user defined comments in grub2 menu for snapshots
|
||||
# Use userdata tag "bootloader=[user defined text]"
|
||||
desc=`xmllint --xpath "/snapshot/userdata[key='bootloader']/value/text()" "${s_dir}/info.xml" 2>/dev/null || echo ""`
|
||||
test -z "$desc" && desc=`xmllint --xpath '/snapshot/description/text()' "${s_dir}/info.xml" 2>/dev/null || echo ""`
|
||||
full_desc=`xmllint --xpath "/snapshot/userdata[key='bootloader']/value/text()" "${s_dir}/info.xml" 2>/dev/null || echo ""`
|
||||
test -z "$full_desc" && desc=`xmllint --xpath '/snapshot/description/text()' "${s_dir}/info.xml" 2>/dev/null || echo ""`
|
||||
|
||||
# FATE#317972
|
||||
# If we have a post entry and the description field is empty,
|
||||
# we should use the "Pre" number and add that description to the post entry.
|
||||
if test -z "$desc" -a "$stype" = "post"; then
|
||||
if test -z "$full_desc" -a -z "$desc" -a "$stype" = "post"; then
|
||||
pre_num=`xmllint --xpath '/snapshot/pre_num/text()' "${s_dir}/info.xml" 2>/dev/null || echo ""`
|
||||
if test -n "$pre_num"; then
|
||||
if test -f "${snapper_snapshot_path}/${pre_num}/info.xml" ; then
|
||||
@ -89,11 +89,12 @@ snapshot_submenu () {
|
||||
test "$stype" = "single" && stype=""
|
||||
test -z "$stype" || stype=",$stype"
|
||||
test -z "$desc" || desc=",$desc"
|
||||
test -z "$full_desc" && full_desc="$kernel_ver,$date$stype$desc"
|
||||
|
||||
if test "${NAME}" = "SLES" -o "${NAME}" = "SLED"; then
|
||||
title="${important}${NAME}${VERSION} ($kernel_ver,$date$stype$desc)"
|
||||
title="${important}${NAME}${VERSION} ($full_desc)"
|
||||
else
|
||||
title="${important}${NAME} ${VERSION} ($kernel_ver,$date$stype$desc)"
|
||||
title="${important}${NAME} ${VERSION} ($full_desc)"
|
||||
fi
|
||||
|
||||
cat <<EOF
|
||||
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Apr 19 08:21:24 UTC 2016 - mchang@suse.com
|
||||
|
||||
- Correct show user defined comments in menu for snapshots (bsc#956698)
|
||||
* modified grub2-snapper-plugin.sh
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Mar 21 11:27:54 UTC 2016 - mchang@suse.com
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user