mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-04-28 11:50:06 +00:00
feat: graceful fallback for apt-get update failures (#12386)
Add apt_update_safe() function that warns instead of aborting when apt-get update fails (e.g. enterprise repo 401 Unauthorized). Shows a helpful hint about disabling the enterprise repo when no subscription is active. Replaces direct apt-get update calls in build.func and install.func.
This commit is contained in:
parent
9e9dfd6947
commit
a2dc3f44d3
3 changed files with 50 additions and 2 deletions
|
|
@ -4927,7 +4927,8 @@ create_lxc_container() {
|
|||
case "${_ans,,}" in
|
||||
y | yes)
|
||||
msg_info "Upgrading Proxmox LXC stack (pve-container, lxc-pve)"
|
||||
if $STD apt-get update && $STD apt-get install -y --only-upgrade pve-container lxc-pve; then
|
||||
apt_update_safe
|
||||
if $STD apt-get install -y --only-upgrade pve-container lxc-pve; then
|
||||
msg_ok "LXC stack upgraded."
|
||||
if [[ "$do_retry" == "yes" ]]; then
|
||||
msg_info "Retrying container creation after upgrade"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue