network: reload DNS only on "up" event from NetworkManager
NetworkManager reports a bunch of events, reloading DNS at each of them
doesn't make sense and is harmful - systemd have ratelimit on service
restart.
Fixes QubesOS/qubes-issues#3135
(cherry picked from commit 0639a4b932
)
This commit is contained in:
parent
ac3c8a76b4
commit
3bf52377a6
|
@ -3,11 +3,13 @@
|
|||
# Source Qubes library.
|
||||
. /usr/lib/qubes/init/functions
|
||||
|
||||
/usr/lib/qubes/qubes-setup-dnat-to-ns
|
||||
if [ "$2" = "up" ]; then
|
||||
/usr/lib/qubes/qubes-setup-dnat-to-ns
|
||||
|
||||
# FIXME: Tinyproxy does not reload DNS servers.
|
||||
if under_systemd ; then
|
||||
systemctl --no-block try-restart qubes-updates-proxy.service
|
||||
else
|
||||
service qubes-updates-proxy try-restart
|
||||
# FIXME: Tinyproxy does not reload DNS servers.
|
||||
if under_systemd ; then
|
||||
systemctl --no-block try-restart qubes-updates-proxy.service
|
||||
else
|
||||
service qubes-updates-proxy try-restart
|
||||
fi
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue
Block a user