From 0639a4b9322b306a322cb9f50240aaf3ad9315ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Sat, 10 Feb 2018 22:12:44 +0100 Subject: [PATCH] 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 --- network/qubes-nmhook | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/network/qubes-nmhook b/network/qubes-nmhook index 1832dc1..bff978c 100755 --- a/network/qubes-nmhook +++ b/network/qubes-nmhook @@ -4,11 +4,13 @@ # shellcheck source=init/functions . /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