]> code.ossystems Code Review - openembedded-core.git/commitdiff
busybox: udhcpc shouldn't be a service
authorJesse Zhang <sen.zhang@windriver.com>
Fri, 27 Jul 2012 09:03:52 +0000 (17:03 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 2 Aug 2012 14:35:19 +0000 (15:35 +0100)
udhcpc is invoked from the networking service, so it shouldn't exist
standalone. If /etc/init.d/busybox-udhcpc is present, it will cause
udhcpc to be started two times.

And since the script doesn't support the stop action, it will cause
udhcpc to be started even when system is being shutdown.

Remove /etc/init.d/busybox-udhcpc to resolve the issues.

[YOCTO #2840]

Signed-off-by: Jesse Zhang <sen.zhang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-core/busybox/busybox.inc
meta/recipes-core/busybox/busybox_1.19.4.bb
meta/recipes-core/busybox/files/busybox-udhcpc [deleted file]

index f5bf2478343c0b8315c63b783b6cc6854fe2803a..78239a233e361306a8751dd341aa8b4db0bdd304 100644 (file)
@@ -20,16 +20,15 @@ FILES_${PN}-httpd = "${sysconfdir}/init.d/busybox-httpd /srv/www"
 FILES_${PN}-syslog = "${sysconfdir}/init.d/syslog* ${sysconfdir}/syslog-startup.conf*"
 FILES_${PN}-mdev = "${sysconfdir}/init.d/mdev ${sysconfdir}/mdev.conf"
 FILES_${PN}-udhcpd = "${sysconfdir}/init.d/busybox-udhcpd"
-FILES_${PN}-udhcpc = "${sysconfdir}/udhcpc.d ${datadir}/udhcpc ${sysconfdir}/init.d/busybox-udhcpc"
+FILES_${PN}-udhcpc = "${sysconfdir}/udhcpc.d ${datadir}/udhcpc"
 
-INITSCRIPT_PACKAGES = "${PN}-httpd ${PN}-syslog ${PN}-udhcpd ${PN}-udhcpc ${PN}-mdev"
+INITSCRIPT_PACKAGES = "${PN}-httpd ${PN}-syslog ${PN}-udhcpd ${PN}-mdev"
 
 INITSCRIPT_NAME_${PN}-httpd = "busybox-httpd"
 INITSCRIPT_NAME_${PN}-syslog = "syslog"
 INITSCRIPT_NAME_${PN}-mdev = "mdev"
 INITSCRIPT_PARAMS_${PN}-mdev = "start 06 S ."
 INITSCRIPT_NAME_${PN}-udhcpd = "busybox-udhcpd" 
-INITSCRIPT_NAME_${PN}-udhcpc = "busybox-udhcpc" 
 CONFFILES_${PN}-syslog = "${sysconfdir}/syslog-startup.conf.${BPN}"
 CONFFILES_${PN}-mdev = "${sysconfdir}/mdev.conf"
 
@@ -188,7 +187,6 @@ do_install () {
                install -d ${D}${datadir}/udhcpc
                 install -m 0755 ${WORKDIR}/simple.script ${D}${sysconfdir}/udhcpc.d/50default
                install -m 0755 ${WORKDIR}/default.script ${D}${datadir}/udhcpc/default.script
-               install -m 0755 ${WORKDIR}/busybox-udhcpc ${D}${sysconfdir}/init.d/
        fi
        if grep "CONFIG_INETD=y" ${WORKDIR}/defconfig; then
                install -m 0755 ${WORKDIR}/inetd ${D}${sysconfdir}/init.d/inetd.${BPN}
index 7bdfbda53871be248c352efcdd037f4b7e1d1cda..ced50c55da0cdc6997441688b0301b5cc1b60f98 100644 (file)
@@ -1,5 +1,5 @@
 require busybox.inc
-PR = "r11"
+PR = "r12"
 
 SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
            file://B921600.patch \
@@ -14,7 +14,6 @@ SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
            file://busybox-cron \
            file://busybox-httpd \
            file://busybox-udhcpd \
-           file://busybox-udhcpc \
            file://default.script \
            file://simple.script \
            file://hwclock.sh \
diff --git a/meta/recipes-core/busybox/files/busybox-udhcpc b/meta/recipes-core/busybox/files/busybox-udhcpc
deleted file mode 100755 (executable)
index 2c43f8d..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-#
-# (c) 2010-2011 Wind River Systems, Inc.
-#
-# Busybox udhcpc init script
-#
-# script to start the udpchc DHCP client on boots where
-# the parameter 'ip=dhcp' was included in the kernel parameters
-
-# ensure the required binaries are present
-[ -x /sbin/udhcpc ] || exit 1
-[ -x /bin/grep ] || exit 1
-[ -x /bin/mount ] || exit 1
-
-# ensure /proc is mounted
-if ! mount | grep -q "/proc "; then
-       exit 2
-fi
-
-rc=0
-if grep -q -E "\bip=dhcp\b" /proc/cmdline; then
-       /sbin/udhcpc -D -s /usr/share/udhcpc/default.script
-       rc=$?
-fi
-exit $rc