aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277>2003-12-19 10:46:00 +0000
committerandersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277>2003-12-19 10:46:00 +0000
commit5a79b222c3e7d32ae85157b6b050c4dbba83393c (patch)
treedd1f094383f4ce33cf9ffacf894b4e772cce6eda
parent4a75d5d7fedd25f141b35f327bc0f7ae3a33467a (diff)
downloadbusybox-w32-5a79b222c3e7d32ae85157b6b050c4dbba83393c.tar.gz
busybox-w32-5a79b222c3e7d32ae85157b6b050c4dbba83393c.tar.bz2
busybox-w32-5a79b222c3e7d32ae85157b6b050c4dbba83393c.zip
Manousaridis Angelos writes:
Hello, I have been using busybox for some time now, for an ARM based platform. I was very pleased when I tried the 1.00preX series, with all the new utilities and daemons. I found out that the ifupdown in busybox does not behave exaclty like the debian version. Then the pre-up script fails, the interface is getting up. Also when the post-up script fails the return value is ignored. Actually everything is always run and the return value is always true. I looked at the original implementation from debian and fixed the busybox version to do the same. A patch is attached if anyone is interested. git-svn-id: svn://busybox.net/trunk/busybox@8123 69ca8d6d-28ef-0310-b511-8ec308f3f277
-rw-r--r--networking/ifupdown.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/networking/ifupdown.c b/networking/ifupdown.c
index 367aafa05..bd0021ab4 100644
--- a/networking/ifupdown.c
+++ b/networking/ifupdown.c
@@ -1044,24 +1044,22 @@ static int check(char *str) {
1044 1044
1045static int iface_up(struct interface_defn_t *iface) 1045static int iface_up(struct interface_defn_t *iface)
1046{ 1046{
1047 int result;
1048 if (!iface->method->up(iface,check)) return -1; 1047 if (!iface->method->up(iface,check)) return -1;
1049 set_environ(iface, "start"); 1048 set_environ(iface, "start");
1050 result = execute_all(iface, doit, "pre-up"); 1049 if (!execute_all(iface, doit, "pre-up")) return 0;
1051 result += iface->method->up(iface, doit); 1050 if (!iface->method->up(iface, doit)) return 0;
1052 result += execute_all(iface, doit, "up"); 1051 if (!execute_all(iface, doit, "up")) return 0;
1053 return(result); 1052 return 1;
1054} 1053}
1055 1054
1056static int iface_down(struct interface_defn_t *iface) 1055static int iface_down(struct interface_defn_t *iface)
1057{ 1056{
1058 int result;
1059 if (!iface->method->down(iface,check)) return -1; 1057 if (!iface->method->down(iface,check)) return -1;
1060 set_environ(iface, "stop"); 1058 set_environ(iface, "stop");
1061 result = execute_all(iface, doit, "down"); 1059 if (!execute_all(iface, doit, "down")) return 0;
1062 result += iface->method->down(iface, doit); 1060 if (!iface->method->down(iface, doit)) return 0;
1063 result += execute_all(iface, doit, "post-down"); 1061 if (!execute_all(iface, doit, "post-down")) return 0;
1064 return(result); 1062 return 1;
1065} 1063}
1066 1064
1067#ifdef CONFIG_FEATURE_IFUPDOWN_MAPPING 1065#ifdef CONFIG_FEATURE_IFUPDOWN_MAPPING