Update build.func

This commit is contained in:
CanbiZ 2025-07-22 10:43:26 +02:00
parent d37fcf79e7
commit c683060454

View File

@ -1354,15 +1354,10 @@ EOF
fi
done
if [ "$var_os" == "alpine" ]; then
PING_TARGET="1.1.1.1"
else
PING_TARGET="deb.debian.org"
fi
if [ "$var_os" != "alpine" ]; then
msg_info "Waiting for network in LXC container"
for i in {1..10}; do
if pct exec "$CTID" -- ping -c1 -W1 "$PING_TARGET" >/dev/null 2>&1; then
if pct exec "$CTID" -- ping -c1 -W1 deb.debian.org >/dev/null 2>&1; then
msg_ok "Network in LXC is reachable"
break
fi
@ -1376,7 +1371,7 @@ EOF
[yY]*)
pct set "$CTID" --nameserver 1.1.1.1
pct set "$CTID" --nameserver 8.8.8.8
if pct exec "$CTID" -- ping -c1 -W1 "$PING_TARGET" >/dev/null 2>&1; then
if pct exec "$CTID" -- ping -c1 -W1 deb.debian.org >/dev/null 2>&1; then
msg_ok "Network reachable after DNS fallback"
else
msg_error "Still no network/DNS in LXC! Aborting customization."
@ -1390,6 +1385,7 @@ EOF
esac
fi
done
fi
msg_info "Customizing LXC Container"
if [ "$var_os" == "alpine" ]; then