From 61d6fbfb34acb15c65fe71ef9f3c34592a272fa6 Mon Sep 17 00:00:00 2001 From: Ian Kelling Date: Fri, 10 May 2019 12:03:52 -0400 Subject: [PATCH] fix for dnsmasq --- newns | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/newns b/newns index e1f3944..ad4c06c 100755 --- a/newns +++ b/newns @@ -295,6 +295,12 @@ start() { mexec sed --follow-symlinks -i "s/nameserver 127\..*/nameserver $network.1/" /run/resolvconf/interface/lo.dnsmasq mexec resolvconf -u fi + # and in debian based distros at least, it runs with --local-service, and needs a restart + # to know about the new local network + if [[ $(systemctl --no-pager show -p ActiveState dnsmasq ) == ActiveState=active ]]; then + systemctl restart dnsmasq + fi + # background: if we did this in openvpn's resolv-conf script, we could guard it in # if capsh --print|grep '\bcap_sys_admin\b' &>/dev/null # and we could get $nn by -- 2.30.2