diff --git a/grub2-snapper-plugin.sh b/grub2-snapper-plugin.sh index 1f371ad..8d6a543 100644 --- a/grub2-snapper-plugin.sh +++ b/grub2-snapper-plugin.sh @@ -62,6 +62,10 @@ snapshot_submenu () { kernel_ver=`readlink ${snapshot}/boot/image | sed -e 's/^image-//' -e 's/-default$//'` fi eval `cat ${snapshot}/etc/os-release` + # bsc#934252 - Replace SLES 12.1 with SLES12-SP1 for the list of snapshots + if test "${NAME}" = "SLES" -o "${NAME}" = "SLED"; then + VERSION=`echo ${VERSION} | sed -e 's!^\([0-9]\{1,\}\)\.\([0-9]\{1,\}\)$!\1-SP\2!'` + fi # FATE#318101 # Show user defined comments in grub2 menu for snapshots @@ -85,7 +89,12 @@ snapshot_submenu () { test "$stype" = "single" && stype="" test -z "$stype" || stype=",$stype" test -z "$desc" || desc=",$desc" - title="${important}${NAME} $VERSION ($kernel_ver,$date$stype$desc)" + + if test "${NAME}" = "SLES" -o "${NAME}" = "SLED"; then + title="${important}${NAME}${VERSION} ($kernel_ver,$date$stype$desc)" + else + title="${important}${NAME} ${VERSION} ($kernel_ver,$date$stype$desc)" + fi cat <