>>>>> "Denys" == Denys Vlasenko <[email protected]> writes:
Hi, >> the post-down scripts are no longer executed, even though >> nothing has actually gone wrong... Denys> I do not want to add more special cases to ifupdown. Denys> There is a potentially infinite number of them. Denys> Use something better than ifupdown. How about we just simplify the code instead then? >From 288af213589462228c860c88ed4a8c3ec9bf6777 Mon Sep 17 00:00:00 2001 From: Peter Korsgaard <[email protected]> Date: Thu, 22 Apr 2010 10:03:36 +0200 Subject: [PATCH] ifupdown: dhcp_down: ignore dhcp errors Perform full down sequence even if the dhcp client couldn't be killed (already gone, using ipv4ll fallback, ..). Signed-off-by: Peter Korsgaard <[email protected]> --- networking/ifupdown.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/networking/ifupdown.c b/networking/ifupdown.c index bf88b1c..f887001 100644 --- a/networking/ifupdown.c +++ b/networking/ifupdown.c @@ -572,8 +572,7 @@ static int FAST_FUNC dhcp_down(struct interface_defn_t *ifd, execfn *exec) #elif ENABLE_UDHCPC static int FAST_FUNC dhcp_down(struct interface_defn_t *ifd, execfn *exec) { - int result; - result = execute("kill " + execute("kill " "`cat /var/run/udhcpc.%iface%.pid` 2>/dev/null", ifd, exec); /* Also bring the hardware interface down since killing the dhcp client alone doesn't do it. @@ -581,8 +580,7 @@ static int FAST_FUNC dhcp_down(struct interface_defn_t *ifd, execfn *exec) /* Sleep a bit, otherwise static_down tries to bring down interface too soon, and it may come back up because udhcpc is still shutting down */ usleep(100000); - result += static_down(ifd, exec); - return ((result == 3) ? 3 : 0); + return static_down(ifd, exec); } #else static int FAST_FUNC dhcp_down(struct interface_defn_t *ifd UNUSED_PARAM, -- 1.7.0 -- Bye, Peter Korsgaard _______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
