* 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
This commit is contained in:
Eelco Dolstra 2007-01-23 10:22:00 +00:00
parent 836789a8a6
commit 5d883cbb85
2 changed files with 2 additions and 1 deletions

View file

@ -62,7 +62,7 @@ import ../helpers/make-etc.nix {
{ # Dhclient hooks for emitting ip-up/ip-down events.
source = pkgs.substituteAll {
src = ./etc/dhclient-exit-hooks;
inherit (pkgs) upstart;
inherit (pkgs) upstart glibc;
};
target = "dhclient-exit-hooks";
}

View file

@ -2,6 +2,7 @@ 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