should work now.

This commit is contained in:
2023-09-28 07:26:38 +03:00
parent 68983889d3
commit 259370ff9d

5
harden
View File

@@ -667,16 +667,13 @@ function update_system {
export NEEDRESTART_MODE=a
export DEBIAN_PRIORITY=critical
# Running sudo with -E will preserve the environment variables set in the script
sudo -E apt update -y && sudo apt upgrade -y # Update the package list and upgrade the packages
sudo -E apt install -y
sudo -E apt update -y && sudo apt upgrade -y && sudo apt autoremove -y && sudo apt autoclean -y # Update the package list, upgrade the packages, remove unnecessary packages and clean old package's cache
;;
"dnf") # If the package manager is dnf
sudo dnf upgrade -y # Update the package list
sudo dnf install -y
;;
"zypper") # If the package manager is zypper
sudo zypper update -y # Update the package list
sudo zypper install -y
;;
*)
# If the package manager is not one of the above, output unsupported package manager