and not just keep it from being autoremoved

Signed-off-by: Fabian Grünbichler <f.gruenbich...@proxmox.com>
---

Notes:
    this makes it more in-line with docs, which currently say:
    
    'the latest version of each kernel series (e.g. 4.15, 5.0).'
    
    will send a separate patch for -docs once this is applied.

 efiboot/functions | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/efiboot/functions b/efiboot/functions
index 79062d8..293d4c0 100755
--- a/efiboot/functions
+++ b/efiboot/functions
@@ -41,11 +41,15 @@ kernel_keep_versions() {
 
        series_metapackages="$(echo "$sorted_list" | grep -Ev '^[^ ]+-pve')"
 
+       oldseries="$(echo "$series_metapackages" | head -n2 | tail -n1)"
+       oldseries_latest_kernel="$(echo "$sorted_list" | grep -E 
"^${oldseries}\.[^ ]+-pve" | head -n1 )"
+
        kernels="$(cat <<-EOF
                $running_version
                $install_version
                $latest_2_versions
                $series_metapackages
+               $oldseries_latest_kernel
                EOF
        )"
 
-- 
2.20.1


_______________________________________________
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to