mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-03-31 06:33:53 -04:00
replace msg_info with msg_warn
This commit is contained in:
@@ -144,7 +144,7 @@ update_os() {
|
|||||||
local apk_ok=false
|
local apk_ok=false
|
||||||
for m in $(printf '%s\n' $alpine_mirrors | shuf); do
|
for m in $(printf '%s\n' $alpine_mirrors | shuf); do
|
||||||
if timeout 2 bash -c "echo >/dev/tcp/$m/80" 2>/dev/null; then
|
if timeout 2 bash -c "echo >/dev/tcp/$m/80" 2>/dev/null; then
|
||||||
msg_info "Attempting mirror: ${m}"
|
msg_custom "${INFO}" "${YW}" "Attempting mirror: ${m}"
|
||||||
cat <<EOF >/etc/apk/repositories
|
cat <<EOF >/etc/apk/repositories
|
||||||
http://$m/alpine/latest-stable/main
|
http://$m/alpine/latest-stable/main
|
||||||
http://$m/alpine/latest-stable/community
|
http://$m/alpine/latest-stable/community
|
||||||
|
|||||||
@@ -4242,9 +4242,9 @@ EOF
|
|||||||
if [[ $mirror_exit -eq 2 ]]; then
|
if [[ $mirror_exit -eq 2 ]]; then
|
||||||
msg_warn "Multiple mirrors failed (possible CDN synchronization issue)."
|
msg_warn "Multiple mirrors failed (possible CDN synchronization issue)."
|
||||||
if [[ "$var_os" == "ubuntu" ]]; then
|
if [[ "$var_os" == "ubuntu" ]]; then
|
||||||
msg_info "Find Ubuntu mirrors at: https://launchpad.net/ubuntu/+archivemirrors"
|
msg_warn "Find Ubuntu mirrors at: https://launchpad.net/ubuntu/+archivemirrors"
|
||||||
else
|
else
|
||||||
msg_info "Find Debian mirrors at: https://www.debian.org/mirror/list"
|
msg_warn "Find Debian mirrors at: https://www.debian.org/mirror/list"
|
||||||
fi
|
fi
|
||||||
local custom_mirror=""
|
local custom_mirror=""
|
||||||
while true; do
|
while true; do
|
||||||
|
|||||||
@@ -307,7 +307,7 @@ apt_update_safe() {
|
|||||||
others_pick=$(printf '%s\n' $others_ok | shuf | head -3 | xargs)
|
others_pick=$(printf '%s\n' $others_ok | shuf | head -3 | xargs)
|
||||||
|
|
||||||
for mirror in $others_pick; do
|
for mirror in $others_pick; do
|
||||||
msg_info "Attempting mirror: ${mirror}"
|
msg_custom "${INFO}" "${YW}" "Attempting mirror: ${mirror}"
|
||||||
if _try_apt_mirror "$mirror"; then
|
if _try_apt_mirror "$mirror"; then
|
||||||
apt_ok=true
|
apt_ok=true
|
||||||
break
|
break
|
||||||
@@ -323,7 +323,7 @@ apt_update_safe() {
|
|||||||
primary="ftp.debian.org"
|
primary="ftp.debian.org"
|
||||||
fi
|
fi
|
||||||
if timeout 2 bash -c "echo >/dev/tcp/$primary/80" 2>/dev/null; then
|
if timeout 2 bash -c "echo >/dev/tcp/$primary/80" 2>/dev/null; then
|
||||||
msg_info "Attempting mirror: ${primary}"
|
msg_custom "${INFO}" "${YW}" "Attempting mirror: ${primary}"
|
||||||
if _try_apt_mirror "$primary"; then
|
if _try_apt_mirror "$primary"; then
|
||||||
apt_ok=true
|
apt_ok=true
|
||||||
fi
|
fi
|
||||||
@@ -338,7 +338,7 @@ apt_update_safe() {
|
|||||||
regional_pick=$(printf '%s\n' $regional_ok | shuf | head -3 | xargs)
|
regional_pick=$(printf '%s\n' $regional_ok | shuf | head -3 | xargs)
|
||||||
|
|
||||||
for mirror in $regional_pick; do
|
for mirror in $regional_pick; do
|
||||||
msg_info "Attempting mirror: ${mirror}"
|
msg_custom "${INFO}" "${YW}" "Attempting mirror: ${mirror}"
|
||||||
if _try_apt_mirror "$mirror"; then
|
if _try_apt_mirror "$mirror"; then
|
||||||
apt_ok=true
|
apt_ok=true
|
||||||
break
|
break
|
||||||
@@ -350,9 +350,9 @@ apt_update_safe() {
|
|||||||
if [[ "$apt_ok" != true ]]; then
|
if [[ "$apt_ok" != true ]]; then
|
||||||
msg_warn "Multiple mirrors failed (possible CDN synchronization issue)."
|
msg_warn "Multiple mirrors failed (possible CDN synchronization issue)."
|
||||||
if [[ "$distro" == "ubuntu" ]]; then
|
if [[ "$distro" == "ubuntu" ]]; then
|
||||||
msg_info "Find Ubuntu mirrors at: https://launchpad.net/ubuntu/+archivemirrors"
|
msg_warn "Find Ubuntu mirrors at: https://launchpad.net/ubuntu/+archivemirrors"
|
||||||
else
|
else
|
||||||
msg_info "Find Debian mirrors at: https://www.debian.org/mirror/list"
|
msg_warn "Find Debian mirrors at: https://www.debian.org/mirror/list"
|
||||||
fi
|
fi
|
||||||
local custom_mirror
|
local custom_mirror
|
||||||
while true; do
|
while true; do
|
||||||
|
|||||||
Reference in New Issue
Block a user