mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-13 20:42:58 +02:00
unbound: use nic carrier instead of /var/ipfire/red/active
This speed boot with static settings and no link and dhcp on intel nics if the mtu is changed by the dhcp lease because the nic loose the carrier and restart the dhcp action at mtu set. Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
This commit is contained in:
@@ -48,7 +48,7 @@ config_header() {
|
||||
}
|
||||
|
||||
update_forwarders() {
|
||||
if [ "${USE_FORWARDERS}" = "1" -a -e "/var/ipfire/red/active" ]; then
|
||||
if [ "${USE_FORWARDERS}" = "1" -a "$(</sys/class/net/$(</var/ipfire/red/iface)/carrier)" = "1" ]; then
|
||||
local forwarders
|
||||
local broken_forwarders
|
||||
|
||||
@@ -473,7 +473,7 @@ disable_dnssec() {
|
||||
fix_time_if_dns_fail() {
|
||||
# If DNS still not work try to init ntp with
|
||||
# hardcoded ntp.ipfire.org (81.3.27.46)
|
||||
if [ -e /var/ipfire/red/active ]; then
|
||||
if [ "$(</sys/class/net/$(</var/ipfire/red/iface)/carrier)" = "1" ]; then
|
||||
host 0.ipfire.pool.ntp.org > /dev/null 2>&1
|
||||
if [ "${?}" != "0" ]; then
|
||||
boot_mesg "DNS still not functioning... Trying to sync time with ntp.ipfire.org (81.3.27.46)..."
|
||||
|
||||
Reference in New Issue
Block a user