From 6859c69a01fb72b2ca2fe1703606732a381c4b31 Mon Sep 17 00:00:00 2001 From: spiritlhl <103393591+spiritLHLS@users.noreply.github.com> Date: Fri, 30 Jun 2023 17:36:59 +0800 Subject: [PATCH] Update install_pve.sh --- scripts/install_pve.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/scripts/install_pve.sh b/scripts/install_pve.sh index ede7895..4fe18ba 100644 --- a/scripts/install_pve.sh +++ b/scripts/install_pve.sh @@ -46,7 +46,7 @@ install_package() { _green "$package_name tried to install but failed, exited the program" _green "$package_name 已尝试安装但失败,退出程序" exit 1 - elif [ "$package_name" == "proxmox-ve" ]; then + elif [ $? -ne 0 ] && [ "$package_name" == "proxmox-ve" ]; then if echo "$apt_output" | grep -qE 'DEBIAN_FRONTEND=dialog dpkg --configure grub-pc' && echo "$apt_output" | grep -qE 'dpkg --configure -a' && echo "$apt_output" | grep -qE 'dpkg: error processing package grub-pc \(--configure\):' @@ -64,10 +64,6 @@ install_package() { exit 1 fi apt-get install -y $package_name --fix-missing - elif [ $? -ne 0 ]; then - _green "$package_name tried to install but failed, exited the program" - _green "$package_name 已尝试安装但失败,退出程序" - exit 1 fi fi _green "$package_name tried to install"