From 1537f8ed8e9a38f1154b1f74bbf3d49f970a8fcb Mon Sep 17 00:00:00 2001 From: CosmicAlpha Date: Sun, 23 Feb 2025 14:11:22 -0700 Subject: [PATCH] Fix --- modules/salt/files/bin/upgrade-packages.sh | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/modules/salt/files/bin/upgrade-packages.sh b/modules/salt/files/bin/upgrade-packages.sh index 37be5b094a..ea6965e1d6 100644 --- a/modules/salt/files/bin/upgrade-packages.sh +++ b/modules/salt/files/bin/upgrade-packages.sh @@ -108,22 +108,16 @@ for server in $servers; do # Check if a reboot will be required before upgrading (if there are kernal upgrades) reboot_required=$(echo "$packages" | grep -q "linux-image" && echo "yes" || echo "no") - # Warn about reboot if necessary + # Warn about required reboot if necessary + echo "Will Upgrade packages $packages_list on $hostname" if [[ "$reboot_required" == "yes" ]]; then - echo "WARNING: Upgrading kernel on $hostname will require a system reboot. However, this script will not automatically perform a reboot. Please plan accordingly." - if ! $skip_confirm; then - read -p "Are you sure you want to proceed with these upgrades? (yes/no): " reboot_confirm - if [[ "$reboot_confirm" != "yes" ]]; then - echo "Skipping upgrade on $hostname..." - continue - fi - fi + echo "WARNING: Upgrading kernel package on $hostname will require a system reboot. However, this script will not automatically perform a reboot. Please plan accordingly." fi # Prompt for confirmation unless --yes or -y is provided if ! $skip_confirm; then - read -p "Upgrading packages $packages_list on $hostname; press enter to confirm or type 'skip' to skip this server... " user_input - if [[ "$user_input" == "skip" ]]; then + read -p "Are you sure you want to proceed with these upgrades? (yes/no): " upgrade_confirm + if [[ "$upgrade_confirm" != "yes" ]]; then echo "Skipping upgrade on $hostname..." continue fi