gives a better overview in case the system was switched at one time
from uefi to legacy (or the other way around).

Signed-off-by: Stoiko Ivanov <s.iva...@proxmox.com>
---
 bin/proxmox-boot-tool | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/bin/proxmox-boot-tool b/bin/proxmox-boot-tool
index 1e984d6..93760fb 100755
--- a/bin/proxmox-boot-tool
+++ b/bin/proxmox-boot-tool
@@ -353,16 +353,18 @@ _status_detail() {
 
        result=""
        if [ -f "${mountpoint}/$PMX_LOADER_CONF" ]; then
-               result="uefi"
                if [ ! -d "${mountpoint}/$PMX_ESP_DIR" ]; then
                        warn "${path}/$PMX_ESP_DIR does not exist"
                fi
+               versions_uefi=$(ls -1 ${mountpoint}/$PMX_ESP_DIR | awk '{printf 
(NR>1?", ":"") $0}')
+               result="uefi (versions: ${versions_uefi})"
        fi
        if [ -d "${mountpoint}/grub" ]; then
+               versions_grub=$(ls -1 ${mountpoint}/vmlinuz-* | awk '{ 
gsub(/.*\/vmlinuz-/, ""); printf (NR>1?", ":"") $0 }')
                if [ -n "$result" ]; then
-                   result="${result},grub"
+                   result="${result}, grub (versions: ${versions_grub})"
                else
-                   result="grub"
+                   result="grub (versions: ${versions_grub})"
                fi
        fi
        echo "$curr_uuid is configured with: $result"
-- 
2.30.2



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

Reply via email to