[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Add post-up.d and pre-down.d directories
From:       Matej Kupljen <matej.kupljen () gmail ! com>
Date:       2012-08-31 12:54:26
Message-ID: CAHMF36F-rvtFdS5eEAoSN_+kxWj4i2pbT3j==pAvSE0=tGza=w () mail ! gmail ! com
[Download RAW message or body]

Hi,

I know this has been discussed before, but it didn't work
while I was testing it. This patch add the run-parts for
post-up.d and pre-down.d directories.

Is this patch OK?

Thanks,
Matej

["ifupdown-post-up-down.patch" (application/octet-stream)]

Add a call also to post-up.d and pre-down.d directories.

Signedi-off-by: Matej Kupljen <matej.kupljen@gmail.com>

--- networking/ifupdown.c.orig	2012-08-31 13:16:57.636817862 +0200
+++ networking/ifupdown.c	2012-08-31 13:30:46.064806660 +0200
@@ -1051,8 +1051,10 @@
 	set_environ(iface, "start", "pre-up");
 	if (!execute_all(iface, "pre-up")) return 0;
 	if (!iface->method->up(iface, doit)) return 0;
-	set_environ(iface, "start", "post-up");
+	set_environ(iface, "start", "up");
 	if (!execute_all(iface, "up")) return 0;
+	set_environ(iface, "start", "post-up");
+	if (!execute_all(iface, "post-up")) return 0;
 	return 1;
 }
 
@@ -1060,8 +1062,10 @@
 {
 	if (!iface->method->down(iface,check)) return -1;
 	set_environ(iface, "stop", "pre-down");
-	if (!execute_all(iface, "down")) return 0;
+	if (!execute_all(iface, "pre-down")) return 0;
 	if (!iface->method->down(iface, doit)) return 0;
+	set_environ(iface, "stop", "down");
+	if (!execute_all(iface, "down")) return 0;
 	set_environ(iface, "stop", "post-down");
 	if (!execute_all(iface, "post-down")) return 0;
 	return 1;


_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic