summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhschang <chang@dev3>2013-02-03 12:54:11 (GMT)
committerhschang <chang@dev3>2013-02-05 02:05:42 (GMT)
commit27a0ac76755cefde098835d700e68c9f3a822f10 (patch)
tree7df18a043b86507774125046fe1c36e8bdaab119
parent05e4c71095aecd76c01c9498643e20a3d077873a (diff)
busybox/udhcpc: set DHCP hostname
-rw-r--r--meta-openvuplus/recipes-core/busybox/busybox-1.19.4/0001-ifupdown-support-post-up-pre-down-hooks.patch4
-rw-r--r--meta-openvuplus/recipes-core/busybox/busybox-1.19.4/0002-ifupdown-code-shrink.patch4
-rw-r--r--meta-openvuplus/recipes-core/busybox/busybox-1.19.4/0003-ifupdown-remove-interface-from-state_list-if-iface_u.patch4
-rw-r--r--meta-openvuplus/recipes-core/busybox/busybox-1.19.4/0004-ifupdown-support-metric-for-static-default-gw.patch4
-rw-r--r--meta-openvuplus/recipes-core/busybox/busybox-1.19.4/0005-ifupdown-improve-compatibility-with-Debian.patch4
-rw-r--r--meta-openvuplus/recipes-core/busybox/busybox-1.19.4/0006-get_linux_version_code-don-t-fail-on-3.0-foo.patch4
-rw-r--r--meta-openvuplus/recipes-core/busybox/busybox-1.19.4/0007-ifplugd-move-read_pid-to-libbb-pidfile.c-and-rename-.patch6
-rw-r--r--meta-openvuplus/recipes-core/busybox/busybox-1.19.4/0008-ifupdown-dhcp_down-wait-until-udhcpc-has-been-killed.patch4
-rw-r--r--meta-openvuplus/recipes-core/busybox/busybox-1.19.4/0009-udhcpc-calculate-broadcast-address-if-not-given-by-s.patch4
-rw-r--r--meta-openvuplus/recipes-core/busybox/busybox-1.19.4/0010-udhcpc-obtain-hostname-from-OS-by-default.patch34
-rw-r--r--meta-openvuplus/recipes-core/busybox/busybox_1.19.4.bbappend3
11 files changed, 55 insertions, 20 deletions
diff --git a/meta-openvuplus/recipes-core/busybox/busybox-1.19.4/0001-ifupdown-support-post-up-pre-down-hooks.patch b/meta-openvuplus/recipes-core/busybox/busybox-1.19.4/0001-ifupdown-support-post-up-pre-down-hooks.patch
index f62fe05..ae78e6d 100644
--- a/meta-openvuplus/recipes-core/busybox/busybox-1.19.4/0001-ifupdown-support-post-up-pre-down-hooks.patch
+++ b/meta-openvuplus/recipes-core/busybox/busybox-1.19.4/0001-ifupdown-support-post-up-pre-down-hooks.patch
@@ -1,7 +1,7 @@
From b58a1a06ca695aed6a4f6e5039e2de0e5a3df111 Mon Sep 17 00:00:00 2001
From: Peter Korsgaard <jacmet@sunsite.dk>
Date: Wed, 19 Oct 2011 02:35:54 +0200
-Subject: [PATCH 1/6] ifupdown: support post-up / pre-down hooks
+Subject: [PATCH 01/10] ifupdown: support post-up / pre-down hooks
function old new delta
set_environ 330 371 +41
@@ -56,5 +56,5 @@ index 3820330..abc6b58 100644
if (!iface->method->down(iface, doit)) return 0;
if (!execute_all(iface, "post-down")) return 0;
--
-1.7.9.5
+1.7.10.4
diff --git a/meta-openvuplus/recipes-core/busybox/busybox-1.19.4/0002-ifupdown-code-shrink.patch b/meta-openvuplus/recipes-core/busybox/busybox-1.19.4/0002-ifupdown-code-shrink.patch
index d0ca655..2d9d695 100644
--- a/meta-openvuplus/recipes-core/busybox/busybox-1.19.4/0002-ifupdown-code-shrink.patch
+++ b/meta-openvuplus/recipes-core/busybox/busybox-1.19.4/0002-ifupdown-code-shrink.patch
@@ -1,7 +1,7 @@
From e5221a142e8ee4509734c17584f898a1f4ac86cc Mon Sep 17 00:00:00 2001
From: Denys Vlasenko <vda.linux@googlemail.com>
Date: Wed, 19 Oct 2011 02:37:08 +0200
-Subject: [PATCH 2/6] ifupdown: code shrink
+Subject: [PATCH 02/10] ifupdown: code shrink
function old new delta
keywords_up_down - 43 +43
@@ -118,5 +118,5 @@ index abc6b58..5946323 100644
}
*pp++ = setlocalenv("IF_%s=%s", iface->option[i].name, iface->option[i].value);
--
-1.7.9.5
+1.7.10.4
diff --git a/meta-openvuplus/recipes-core/busybox/busybox-1.19.4/0003-ifupdown-remove-interface-from-state_list-if-iface_u.patch b/meta-openvuplus/recipes-core/busybox/busybox-1.19.4/0003-ifupdown-remove-interface-from-state_list-if-iface_u.patch
index e53d78a..2f96179 100644
--- a/meta-openvuplus/recipes-core/busybox/busybox-1.19.4/0003-ifupdown-remove-interface-from-state_list-if-iface_u.patch
+++ b/meta-openvuplus/recipes-core/busybox/busybox-1.19.4/0003-ifupdown-remove-interface-from-state_list-if-iface_u.patch
@@ -1,7 +1,7 @@
From a7b406ba64b7a4d9c9610726cb72568fc9848f5d Mon Sep 17 00:00:00 2001
From: Lauri Hintsala <lauri.hintsala@bluegiga.com>
Date: Wed, 14 Dec 2011 16:49:58 +0200
-Subject: [PATCH 3/6] ifupdown: remove interface from state_list if iface_up
+Subject: [PATCH 03/10] ifupdown: remove interface from state_list if iface_up
fails
Fix the issue where interface is set to the configured state even if
@@ -27,5 +27,5 @@ index 5946323..9c2cad2 100644
if (iface_state == NULL) {
llist_add_to_end(&state_list, newiface);
--
-1.7.9.5
+1.7.10.4
diff --git a/meta-openvuplus/recipes-core/busybox/busybox-1.19.4/0004-ifupdown-support-metric-for-static-default-gw.patch b/meta-openvuplus/recipes-core/busybox/busybox-1.19.4/0004-ifupdown-support-metric-for-static-default-gw.patch
index 3e77a1c..d9c14aa 100644
--- a/meta-openvuplus/recipes-core/busybox/busybox-1.19.4/0004-ifupdown-support-metric-for-static-default-gw.patch
+++ b/meta-openvuplus/recipes-core/busybox/busybox-1.19.4/0004-ifupdown-support-metric-for-static-default-gw.patch
@@ -1,7 +1,7 @@
From fecb0cbff5ca703f8fc00a8e0e93f1f2e3ae942b Mon Sep 17 00:00:00 2001
From: Natanael Copa <natanael.copa@gmail.com>
Date: Fri, 17 Feb 2012 19:36:26 +0000
-Subject: [PATCH 4/6] ifupdown: support metric for static default gw
+Subject: [PATCH 04/10] ifupdown: support metric for static default gw
This is useful when you have multiple ISPs with failover. It allows
setting the priority of the static gateway and makes it possible
@@ -60,5 +60,5 @@ index 9c2cad2..9f49619 100644
# endif
}
--
-1.7.9.5
+1.7.10.4
diff --git a/meta-openvuplus/recipes-core/busybox/busybox-1.19.4/0005-ifupdown-improve-compatibility-with-Debian.patch b/meta-openvuplus/recipes-core/busybox/busybox-1.19.4/0005-ifupdown-improve-compatibility-with-Debian.patch
index 84e1947..ae1f725 100644
--- a/meta-openvuplus/recipes-core/busybox/busybox-1.19.4/0005-ifupdown-improve-compatibility-with-Debian.patch
+++ b/meta-openvuplus/recipes-core/busybox/busybox-1.19.4/0005-ifupdown-improve-compatibility-with-Debian.patch
@@ -1,7 +1,7 @@
From 7ec30bf273cbdf5f0ae335684939a883182e493e Mon Sep 17 00:00:00 2001
From: Andreas Oberritter <obi@opendreambox.org>
Date: Mon, 23 Apr 2012 22:08:39 +0200
-Subject: [PATCH 5/6] ifupdown: improve compatibility with Debian
+Subject: [PATCH 05/10] ifupdown: improve compatibility with Debian
Set environment variable 'PHASE'.
Treat post-up and pre-down as aliases for up and down.
@@ -93,5 +93,5 @@ index 9f49619..5c3dcec 100644
return 1;
}
--
-1.7.9.5
+1.7.10.4
diff --git a/meta-openvuplus/recipes-core/busybox/busybox-1.19.4/0006-get_linux_version_code-don-t-fail-on-3.0-foo.patch b/meta-openvuplus/recipes-core/busybox/busybox-1.19.4/0006-get_linux_version_code-don-t-fail-on-3.0-foo.patch
index 41c31b8..f061814 100644
--- a/meta-openvuplus/recipes-core/busybox/busybox-1.19.4/0006-get_linux_version_code-don-t-fail-on-3.0-foo.patch
+++ b/meta-openvuplus/recipes-core/busybox/busybox-1.19.4/0006-get_linux_version_code-don-t-fail-on-3.0-foo.patch
@@ -1,7 +1,7 @@
From c011ab2fb52c2ee03aa9544b0d242683ee4362e1 Mon Sep 17 00:00:00 2001
From: Andreas Oberritter <obi@opendreambox.org>
Date: Fri, 27 Apr 2012 01:40:25 +0200
-Subject: [PATCH 6/6] get_linux_version_code: don't fail on 3.0-foo
+Subject: [PATCH 06/10] get_linux_version_code: don't fail on 3.0-foo
Fixes segmentation fault in mount (nfs):
@@ -39,5 +39,5 @@ index a168a1e..12f1146 100644
}
return r;
--
-1.7.9.5
+1.7.10.4
diff --git a/meta-openvuplus/recipes-core/busybox/busybox-1.19.4/0007-ifplugd-move-read_pid-to-libbb-pidfile.c-and-rename-.patch b/meta-openvuplus/recipes-core/busybox/busybox-1.19.4/0007-ifplugd-move-read_pid-to-libbb-pidfile.c-and-rename-.patch
index c95b729..742e79b 100644
--- a/meta-openvuplus/recipes-core/busybox/busybox-1.19.4/0007-ifplugd-move-read_pid-to-libbb-pidfile.c-and-rename-.patch
+++ b/meta-openvuplus/recipes-core/busybox/busybox-1.19.4/0007-ifplugd-move-read_pid-to-libbb-pidfile.c-and-rename-.patch
@@ -1,8 +1,8 @@
From 4119652f74ce6f8f370df3c80076792d509bc941 Mon Sep 17 00:00:00 2001
From: Andreas Oberritter <obi@opendreambox.org>
Date: Mon, 14 May 2012 16:15:50 +0200
-Subject: [PATCH 7/9] ifplugd: move read_pid to libbb/pidfile.c and rename it
- to read_pidfile
+Subject: [PATCH 07/10] ifplugd: move read_pid to libbb/pidfile.c and rename
+ it to read_pidfile
Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
---
@@ -90,5 +90,5 @@ index d8358cd..9a15576 100644
if (opts & FLAG_KILL) {
if (pid_from_pidfile > 0)
--
-1.7.9.5
+1.7.10.4
diff --git a/meta-openvuplus/recipes-core/busybox/busybox-1.19.4/0008-ifupdown-dhcp_down-wait-until-udhcpc-has-been-killed.patch b/meta-openvuplus/recipes-core/busybox/busybox-1.19.4/0008-ifupdown-dhcp_down-wait-until-udhcpc-has-been-killed.patch
index 9df63cb..3b43d3d 100644
--- a/meta-openvuplus/recipes-core/busybox/busybox-1.19.4/0008-ifupdown-dhcp_down-wait-until-udhcpc-has-been-killed.patch
+++ b/meta-openvuplus/recipes-core/busybox/busybox-1.19.4/0008-ifupdown-dhcp_down-wait-until-udhcpc-has-been-killed.patch
@@ -1,7 +1,7 @@
From 517f8da0345752d3cc5e2c99b8acd88c60355373 Mon Sep 17 00:00:00 2001
From: Andreas Oberritter <obi@opendreambox.org>
Date: Mon, 14 May 2012 16:20:36 +0200
-Subject: [PATCH 8/9] ifupdown: dhcp_down: wait until udhcpc has been killed
+Subject: [PATCH 08/10] ifupdown: dhcp_down: wait until udhcpc has been killed
* Otherwise there's a race condition between ifdown and udhcpc,
which executes deconfig scripts in /etc/udhcpc.d.
@@ -52,5 +52,5 @@ index 5c3dcec..35e5035 100644
# else
static int FAST_FUNC dhcp_down(struct interface_defn_t *ifd UNUSED_PARAM,
--
-1.7.9.5
+1.7.10.4
diff --git a/meta-openvuplus/recipes-core/busybox/busybox-1.19.4/0009-udhcpc-calculate-broadcast-address-if-not-given-by-s.patch b/meta-openvuplus/recipes-core/busybox/busybox-1.19.4/0009-udhcpc-calculate-broadcast-address-if-not-given-by-s.patch
index c2a50e6..b623e3f 100644
--- a/meta-openvuplus/recipes-core/busybox/busybox-1.19.4/0009-udhcpc-calculate-broadcast-address-if-not-given-by-s.patch
+++ b/meta-openvuplus/recipes-core/busybox/busybox-1.19.4/0009-udhcpc-calculate-broadcast-address-if-not-given-by-s.patch
@@ -1,7 +1,7 @@
From 7f3d0f0e58602e8d96988736d80ba28d31338ea2 Mon Sep 17 00:00:00 2001
From: Andreas Oberritter <obi@opendreambox.org>
Date: Mon, 14 May 2012 17:32:16 +0200
-Subject: [PATCH 9/9] udhcpc: calculate broadcast address if not given by
+Subject: [PATCH 09/10] udhcpc: calculate broadcast address if not given by
server
* This is more efficient than doing it in the scripts
@@ -53,5 +53,5 @@ index 4d755e6..9fbd3b3 100644
}
--
-1.7.9.5
+1.7.10.4
diff --git a/meta-openvuplus/recipes-core/busybox/busybox-1.19.4/0010-udhcpc-obtain-hostname-from-OS-by-default.patch b/meta-openvuplus/recipes-core/busybox/busybox-1.19.4/0010-udhcpc-obtain-hostname-from-OS-by-default.patch
new file mode 100644
index 0000000..489c735
--- /dev/null
+++ b/meta-openvuplus/recipes-core/busybox/busybox-1.19.4/0010-udhcpc-obtain-hostname-from-OS-by-default.patch
@@ -0,0 +1,34 @@
+From 2b4773b6ae48fee56c60fb4a1835672cbca78aee Mon Sep 17 00:00:00 2001
+From: Andreas Oberritter <obi@opendreambox.org>
+Date: Tue, 15 Jan 2013 17:33:53 +0100
+Subject: [PATCH 10/10] udhcpc: obtain hostname from OS by default
+
+* Doesn't require the 'hostname' option in /etc/network/interfaces,
+ and thus makes udhcpc behave like other clients.
+
+Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
+---
+ networking/udhcp/dhcpc.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c
+index 9fbd3b3..ec9f25d 100644
+--- a/networking/udhcp/dhcpc.c
++++ b/networking/udhcp/dhcpc.c
+@@ -1117,6 +1117,13 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv)
+ );
+ if (opt & (OPT_h|OPT_H))
+ client_config.hostname = alloc_dhcp_option(DHCP_HOST_NAME, str_h, 0);
++ else {
++ char hostname[256]; /* SUSv2: hostnames are <= 255 bytes */
++ if (gethostname(hostname, sizeof(hostname)) == 0) {
++ hostname[sizeof(hostname) - 1] = '\0';
++ client_config.hostname = alloc_dhcp_option(DHCP_HOST_NAME, hostname, 0);
++ }
++ }
+ if (opt & OPT_F) {
+ /* FQDN option format: [0x51][len][flags][0][0]<fqdn> */
+ client_config.fqdn = alloc_dhcp_option(DHCP_FQDN, str_F, 3);
+--
+1.7.10.4
+
diff --git a/meta-openvuplus/recipes-core/busybox/busybox_1.19.4.bbappend b/meta-openvuplus/recipes-core/busybox/busybox_1.19.4.bbappend
index 8e8fad0..c061202 100644
--- a/meta-openvuplus/recipes-core/busybox/busybox_1.19.4.bbappend
+++ b/meta-openvuplus/recipes-core/busybox/busybox_1.19.4.bbappend
@@ -1,4 +1,4 @@
-PR .= "-vuplus8"
+PR .= "-vuplus9"
SRC_URI += " \
file://0001-ifupdown-support-post-up-pre-down-hooks.patch \
@@ -9,6 +9,7 @@ SRC_URI += " \
file://0006-get_linux_version_code-don-t-fail-on-3.0-foo.patch \
file://0007-ifplugd-move-read_pid-to-libbb-pidfile.c-and-rename-.patch \
file://0009-udhcpc-calculate-broadcast-address-if-not-given-by-s.patch \
+ file://0010-udhcpc-obtain-hostname-from-OS-by-default.patch \
file://0001-work-around-linux-ext2_fs.h-breakage.patch \
file://0002-Create-and-use-our-own-copy-of-linux-ext2_fs.h.patch \
file://0003-Drop-include-bb_linux_ext2_fs.h-use-existing-e2fspro.patch \