[oe-commits] Michael Smith : busybox: fix udhcpc default script location when prefix is not "/usr"

git version control git at git.openembedded.org
Wed Jun 10 18:19:11 UTC 2009


Module: openembedded.git
Branch: xora/angstrom-srcpv
Commit: 654cb590ae11f3ada8ed877a6f81f14cabe7b506
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=654cb590ae11f3ada8ed877a6f81f14cabe7b506

Author: Michael Smith <msmith at cbnco.com>
Date:   Sun Jun  7 16:43:26 2009 -0400

busybox: fix udhcpc default script location when prefix is not "/usr"

Signed-off-by: Michael Smith <msmith at cbnco.com>

---

 recipes/busybox/busybox-1.13.2/defconfig |    2 +-
 recipes/busybox/busybox.inc              |    8 +++++++-
 recipes/busybox/busybox_1.11.3.bb        |    5 -----
 recipes/busybox/busybox_1.13.2.bb        |    6 ++----
 4 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/recipes/busybox/busybox-1.13.2/defconfig b/recipes/busybox/busybox-1.13.2/defconfig
index 0db650f..ddbaa08 100644
--- a/recipes/busybox/busybox-1.13.2/defconfig
+++ b/recipes/busybox/busybox-1.13.2/defconfig
@@ -720,7 +720,7 @@ CONFIG_FEATURE_UDHCPC_ARPING=y
 # CONFIG_FEATURE_UDHCP_PORT is not set
 # CONFIG_UDHCP_DEBUG is not set
 # CONFIG_FEATURE_UDHCP_RFC3397 is not set
-CONFIG_UDHCPC_DEFAULT_SCRIPT="/usr/share/udhcpc/default.script"
+CONFIG_UDHCPC_DEFAULT_SCRIPT="@DATADIR@/udhcpc/default.script"
 CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS=80
 # CONFIG_VCONFIG is not set
 CONFIG_WGET=y
diff --git a/recipes/busybox/busybox.inc b/recipes/busybox/busybox.inc
index 106938e..e056ad1 100644
--- a/recipes/busybox/busybox.inc
+++ b/recipes/busybox/busybox.inc
@@ -11,7 +11,7 @@ LICENSE = "GPL"
 SECTION = "base"
 PRIORITY = "required"
 
-INC_PR = "r20"
+INC_PR = "r21"
 
 SRC_URI = "\
   http://www.busybox.net/downloads/busybox-${PV}.tar.gz \
@@ -59,6 +59,12 @@ LD = "${CC} -nostdlib"
 
 inherit cml1 update-rc.d
 
+do_configure () {
+	sed -e 's#@DATADIR@#${datadir}#g' \
+		< ${WORKDIR}/defconfig > ${S}/.config
+	cml1_do_configure
+}
+
 do_compile() {
 	unset CFLAGS CPPFLAGS CXXFLAGS
 	base_do_compile
diff --git a/recipes/busybox/busybox_1.11.3.bb b/recipes/busybox/busybox_1.11.3.bb
index 673fe15..5518264 100644
--- a/recipes/busybox/busybox_1.11.3.bb
+++ b/recipes/busybox/busybox_1.11.3.bb
@@ -25,11 +25,6 @@ SRC_URI = "\
 
 EXTRA_OEMAKE += "V=1 ARCH=${TARGET_ARCH} CROSS_COMPILE=${TARGET_PREFIX}"
 
-do_configure () {
-	install -m 0644 ${WORKDIR}/defconfig ${S}/.config
-	cml1_do_configure
-}
-
 do_install_append() {
     install -m 0644 ${WORKDIR}/mdev.conf ${D}${sysconfdir}/
     install -d ${D}${sysconfdir}/init.d/
diff --git a/recipes/busybox/busybox_1.13.2.bb b/recipes/busybox/busybox_1.13.2.bb
index c1cc51b..03a7208 100644
--- a/recipes/busybox/busybox_1.13.2.bb
+++ b/recipes/busybox/busybox_1.13.2.bb
@@ -39,12 +39,10 @@ SRC_URI = "\
 
 EXTRA_OEMAKE += "V=1 ARCH=${TARGET_ARCH} CROSS_COMPILE=${TARGET_PREFIX}"
 
-do_configure () {
-	install -m 0644 ${WORKDIR}/defconfig ${S}/.config
+do_configure_prepend () {
 	if [ "${TARGET_ARCH}" = "avr32" ] ; then
-		sed -i s:CONFIG_FEATURE_OSF_LABEL=y:CONFIG_FEATURE_OSF_LABEL=n: ${S}/.config
+		sed -i s:CONFIG_FEATURE_OSF_LABEL=y:CONFIG_FEATURE_OSF_LABEL=n: ${WORKDIR}/defconfig
 	fi
-	cml1_do_configure
 }
 
 do_install_append() {





More information about the Openembedded-commits mailing list