From 5a21341920284ff422a63ee8d56c1a89afef2ed2 Mon Sep 17 00:00:00 2001 From: Pulse Monitor Date: Sun, 24 Aug 2025 22:52:25 +0000 Subject: [PATCH] improve: storage pool display now shows available space in GB - Changed from showing just percentage to "X.X GB free of Y.Y GB (Z% used)" - Much more useful for users to see actual available space - Applies to both Quick and Advanced installation modes --- install.sh | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index afd14732f..09d24b158 100755 --- a/install.sh +++ b/install.sh @@ -335,7 +335,12 @@ create_lxc_container() { # Show available storage with usage details echo echo "Available storage pools:" - echo "$STORAGE_INFO" | awk '{printf " %-15s %-8s %5s used\n", $1, $2, $6}' || echo " No storage pools found" + echo "$STORAGE_INFO" | awk '{ + # Convert KB to GB for readability + avail_gb = $6 / 1048576 + total_gb = $4 / 1048576 + printf " %-15s %-8s %6.1f GB free of %6.1f GB (%s used)\n", $1, $2, avail_gb, total_gb, $7 + }' || echo " No storage pools found" safe_read "Storage [$DEFAULT_STORAGE]: " storage storage=${storage:-$DEFAULT_STORAGE} @@ -373,7 +378,12 @@ create_lxc_container() { echo if [[ -n "$STORAGE_INFO" ]]; then echo "Available storage pools:" - echo "$STORAGE_INFO" | awk '{printf " %-15s %-8s %5s used\n", $1, $2, $6}' + echo "$STORAGE_INFO" | awk '{ + # Convert KB to GB for readability + avail_gb = $6 / 1048576 + total_gb = $4 / 1048576 + printf " %-15s %-8s %6.1f GB free of %6.1f GB (%s used)\n", $1, $2, avail_gb, total_gb, $7 + }' else echo "No storage pools detected" fi