When the ppp daemon establishes a connection, the /etc/ppp/ip-up.d/0000usepeerdns file is executed.
Where the pppd "usepeerdns" config options is used (most cases), the 0000usepeerdns script tests for the nscd (name service cache daemon) being running incorrectly [1], so does not restart it.
The correct pid file to test for is /var/run/nscd/nscd.pid. Rather than restarting the service and flushing everything, it is better to invalidate just the hosts [2].
Diff against original file is in [3]. Apply with 'patch -l'.
--- [1]
if [ -e /var/run/nscd.pid ]; then
/etc/init.d/nscd restart || true
fi
Binary package hint: ppp
When the ppp daemon establishes a connection, the /etc/ppp/ ip-up.d/ 0000usepeerdns file is executed.
Where the pppd "usepeerdns" config options is used (most cases), the 0000usepeerdns script tests for the nscd (name service cache daemon) being running incorrectly [1], so does not restart it.
The correct pid file to test for is /var/run/ nscd/nscd. pid. Rather than restarting the service and flushing everything, it is better to invalidate just the hosts [2].
Diff against original file is in [3]. Apply with 'patch -l'.
--- [1]
if [ -e /var/run/nscd.pid ]; then
/etc/init.d/nscd restart || true
fi
--- [2]
[ -e /var/run/ nscd/nscd. pid ] && nscd -i hosts
--- [3]
--- 0000usepeerdns.orig 2007-01-16 18:06:12.000000000 +0000 F.tmp" "$REALRESOLVCONF"
+++ 0000usepeerdns 2007-01-16 18:06:57.000000000 +0000
@@ -25,8 +25,8 @@
mv -f "$REALRESOLVCON
# restart nscd because resolv.conf has changed nscd/nscd. pid ]; then
-if [ -e /var/run/nscd.pid ]; then
- /etc/init.d/nscd restart || true
+if [ -e /var/run/
+ nscd -i hosts
fi
exit 0