nixpkgs/system/etc/dhclient-exit-hooks
Eelco Dolstra 5d883cbb85 * Flush the nscd hosts table after we've acquired an DHCP lease to
prevent problems with negative caching (NIXOS-45).

svn path=/nixos/trunk/; revision=7763
2007-01-23 10:22:00 +00:00

12 lines
308 B
Plaintext

echo "$reason" >> /tmp/dhcp-exit
echo "$exit_status" >> /tmp/dhcp-exit
if test "$reason" = BOUND -o "$reason" = REBOOT; then
@glibc@/sbin/nscd --invalidate hosts
@upstart@/sbin/initctl emit ip-up
fi
if test "$reason" = EXPIRE -o "$reason" = RELEASE; then
@upstart@/sbin/initctl emit ip-down
fi