restart network will have better success

This commit is contained in:
2025-09-25 21:35:59 +02:00
parent 57cf93ac41
commit 850831f51c

View File

@@ -100,11 +100,10 @@ conf_network()
fi fi
done done
prnt I "Trying to raise down iface up. Allready configured iface will require a reboot" prnt I "Restart network to apply changes"
ifup -a || true && prnt W "Ignoring errors here." svc_restart networking || true && prnt W "Ignoring errors here."
unset iface if_file unset iface if_file
export NEED_REBOOT=true
} }
precheck_conf_network() precheck_conf_network()
@@ -119,7 +118,7 @@ precheck_conf_network()
die 175 die 175
else else
if [[ $(grep "up" /sys/class/net/$iface/operstate) ]]; then if [[ $(grep "up" /sys/class/net/$iface/operstate) ]]; then
prnt W "The IPv4 iface $iface, is already configured, a reboot will be required." prnt W "The IPv4 iface $iface, is already configured, a reboot could be required."
fi fi
fi fi
if [[ -z $(eval echo \$NET4_MODE_$iface) ]]; then if [[ -z $(eval echo \$NET4_MODE_$iface) ]]; then
@@ -157,7 +156,7 @@ precheck_conf_network()
die 175 die 175
else else
if [[ $(grep "up" /sys/class/net/$iface/operstate) ]]; then if [[ $(grep "up" /sys/class/net/$iface/operstate) ]]; then
prnt W "The IPv6 iface $iface, is already configured, a reboot will be required." prnt W "The IPv6 iface $iface, is already configured, a reboot could be required."
fi fi
fi fi
if [[ -z $(eval echo \$NET6_MODE_$iface) ]]; then if [[ -z $(eval echo \$NET6_MODE_$iface) ]]; then