mirror of
https://github.com/thelittlerocket/pve.git
synced 2025-03-03 09:13:29 +08:00
Update
This commit is contained in:
parent
d19ee468da
commit
1cb26b9f64
3 changed files with 22 additions and 5 deletions
|
@ -2,6 +2,7 @@
|
|||
|
||||
2023.06.29
|
||||
|
||||
- 规整输出,所有输出修改为中英双语
|
||||
- 修改部分脚本提示避免脚本被小白重复执行
|
||||
|
||||
2023.06.26
|
||||
|
|
|
@ -13,9 +13,9 @@
|
|||
|
||||
## 更新
|
||||
|
||||
2023.06.29
|
||||
2023.06.30
|
||||
|
||||
- 规整输出,所有输出修改为中英双语
|
||||
- 修复安装proxmox-ve时grub-pc配置可能冲突的问题
|
||||
|
||||
[更新日志](CHANGELOG.md)
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
# from
|
||||
# https://github.com/spiritLHLS/pve
|
||||
# 2023.06.29
|
||||
# 2023.06.30
|
||||
|
||||
# cd /root >/dev/null 2>&1
|
||||
_red() { echo -e "\033[31m\033[01m$@\033[0m"; }
|
||||
|
@ -40,12 +40,28 @@ install_package() {
|
|||
else
|
||||
apt-get install -y $package_name
|
||||
if [ $? -ne 0 ]; then
|
||||
apt-get install -y $package_name --fix-missing
|
||||
apt_output=$(apt-get install -y $package_name --fix-missing 2>&1)
|
||||
fi
|
||||
if [ $? -ne 0 ]; then
|
||||
if [ $? -ne 0 ] && [ "$package_name" != "proxmox-ve" ]; then
|
||||
_green "$package_name tried to install but failed, exited the program"
|
||||
_green "$package_name 已尝试安装但失败,退出程序"
|
||||
exit 1
|
||||
elif [ "$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\):'
|
||||
then
|
||||
DEBIAN_FRONTEND=dialog dpkg --configure grub-pc
|
||||
dpkg --configure -a
|
||||
if [ $? -ne 0 ]; then
|
||||
_green "$package_name tried to install but failed, exited the program"
|
||||
_green "$package_name 已尝试安装但失败,退出程序"
|
||||
exit 1
|
||||
fi
|
||||
apt-get install -y $package_name --fix-missing
|
||||
fi
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
_green "$package_name tried to install"
|
||||
_green "$package_name 已尝试安装"
|
||||
|
|
Loading…
Reference in a new issue