iankelling.org
/
git
/
newns
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
e5001f8
)
fix for dnsmasq
author
Ian Kelling
<iank@fsf.org>
Fri, 10 May 2019 16:03:52 +0000
(12:03 -0400)
committer
Ian Kelling
<iank@fsf.org>
Fri, 10 May 2019 16:17:24 +0000
(12:17 -0400)
newns
patch
|
blob
|
history
diff --git
a/newns
b/newns
index e1f3944ba7318a16d13169edbc3c5986cc0598ae..ad4c06c437c7b96d85232b41293ba48e19cb78d1 100755
(executable)
--- 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
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
# 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