From 5d883cbb857f064edb4ff6f2799fa90a72dbdd77 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 23 Jan 2007 10:22:00 +0000 Subject: [PATCH] * 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 --- system/etc.nix | 2 +- system/etc/dhclient-exit-hooks | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/system/etc.nix b/system/etc.nix index aa93ad33edc..8d023dff05c 100644 --- a/system/etc.nix +++ b/system/etc.nix @@ -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"; } diff --git a/system/etc/dhclient-exit-hooks b/system/etc/dhclient-exit-hooks index 50463edb4c9..94523313055 100644 --- a/system/etc/dhclient-exit-hooks +++ b/system/etc/dhclient-exit-hooks @@ -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