From: Rene Wagner Date: Fri, 20 Oct 2006 21:38:38 +0000 (+0200) Subject: busybox: add ifupdown phase support. X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=be97c28b8d7f2cdb9410cdaee48151463d1d220c;p=familiar-h63xx-build.git busybox: add ifupdown phase support. Signed-off-by: Rene Wagner --- diff --git a/org.handhelds.familiar/packages/busybox/busybox-1.00/ifupdown-phase.patch b/org.handhelds.familiar/packages/busybox/busybox-1.00/ifupdown-phase.patch new file mode 100644 index 0000000..0b5c138 --- /dev/null +++ b/org.handhelds.familiar/packages/busybox/busybox-1.00/ifupdown-phase.patch @@ -0,0 +1,58 @@ +--- busybox-1.00/networking/ifupdown.c.orig 2006-10-20 23:25:53.000000000 +0200 ++++ busybox-1.00/networking/ifupdown.c 2006-10-20 23:29:07.000000000 +0200 +@@ -957,11 +957,11 @@ + return result; + } + +-static void set_environ(struct interface_defn_t *iface, char *mode) ++static void set_environ(struct interface_defn_t *iface, char *mode, char *phase) + { + char **environend; + int i; +- const int n_env_entries = iface->n_options + 5; ++ const int n_env_entries = iface->n_options + 6; + char **ppch; + + if (environ != NULL) { +@@ -995,6 +995,8 @@ + *environend = NULL; + *(environend++) = setlocalenv("%s=%s", "MODE", mode); + *environend = NULL; ++ *(environend++) = setlocalenv("%s=%s", "PHASE", phase); ++ *environend = NULL; + *(environend++) = setlocalenv("%s=%s", "PATH", "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"); + *environend = NULL; + } +@@ -1050,20 +1052,30 @@ + static int iface_up(struct interface_defn_t *iface) + { + if (!iface->method->up(iface,check)) return -1; +- set_environ(iface, "start"); ++ ++ set_environ(iface, "start", "pre-up"); + if (!execute_all(iface, doit, "pre-up")) return 0; ++ + if (!iface->method->up(iface, doit)) return 0; ++ ++ set_environ(iface, "start", "post-up"); + if (!execute_all(iface, doit, "up")) return 0; ++ + return 1; + } + + static int iface_down(struct interface_defn_t *iface) + { + if (!iface->method->down(iface,check)) return -1; +- set_environ(iface, "stop"); ++ ++ set_environ(iface, "stop", "pre-down"); + if (!execute_all(iface, doit, "down")) return 0; ++ + if (!iface->method->down(iface, doit)) return 0; ++ ++ set_environ(iface, "stop", "post-down"); + if (!execute_all(iface, doit, "post-down")) return 0; ++ + return 1; + } + diff --git a/org.handhelds.familiar/packages/busybox/busybox_1.00.bb b/org.handhelds.familiar/packages/busybox/busybox_1.00.bb index 41c22bb..d5090cd 100644 --- a/org.handhelds.familiar/packages/busybox/busybox_1.00.bb +++ b/org.handhelds.familiar/packages/busybox/busybox_1.00.bb @@ -10,7 +10,7 @@ HOMEPAGE = "http://www.busybox.net" LICENSE = "GPL" SECTION = "base" PRIORITY = "required" -PR = "r36" +PR = "r37" SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.gz \ file://add-getkey-applet.patch;patch=1 \ @@ -29,6 +29,7 @@ SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.gz \ file://dhcp-hostname.patch;patch=1 \ file://gzip-spurious-const.patch;patch=1 \ file://ifupdown-spurious-environ.patch;patch=1 \ + file://ifupdown-phase.patch;patch=1 \ file://start-stop-daemon-oknodo-support.patch;patch=1 \ file://defconfig \ file://busybox-cron \