forked from pool/grub2
37a1adaf14
Only run preun when deinstalling package (forwarded request 76120 from a_jaeger) OBS-URL: https://build.opensuse.org/request/show/76157 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/grub2?expand=0&rev=16
27 lines
676 B
Diff
27 lines
676 B
Diff
Index: grub-1.99/util/grub.d/10_linux.in
|
|
===================================================================
|
|
--- grub-1.99.orig/util/grub.d/10_linux.in
|
|
+++ grub-1.99/util/grub.d/10_linux.in
|
|
@@ -144,6 +144,7 @@ esac
|
|
prepare_boot_cache=
|
|
prepare_root_cache=
|
|
|
|
+in_submenu=false
|
|
while [ "x$list" != "x" ] ; do
|
|
linux=`version_find_latest $list`
|
|
echo "Found linux image: $linux" >&2
|
|
@@ -196,4 +197,13 @@ while [ "x$list" != "x" ] ; do
|
|
fi
|
|
|
|
list=`echo $list | tr ' ' '\n' | grep -vx $linux | tr '\n' ' '`
|
|
+
|
|
+ if [ "$list" ] && ! $in_submenu; then
|
|
+ echo "submenu \"Previous Linux versions\" {"
|
|
+ in_submenu=:
|
|
+ fi
|
|
done
|
|
+
|
|
+if $in_submenu; then
|
|
+ echo "}"
|
|
+fi
|