Patchwork [v2,1/2] connman-conf: Move the setup script into /usr/lib/connman

login
register
mail settings
Submitter Jukka Rissanen
Date March 22, 2013, 8:11 a.m.
Message ID <1363939902-23537-2-git-send-email-jukka.rissanen@linux.intel.com>
Download mbox | patch
Permalink /patch/46673/
State Accepted
Commit e93b6376a0cff5321dd7fc13a88c8b06ae8b83c7
Headers show

Comments

Jukka Rissanen - March 22, 2013, 8:11 a.m.
The /etc/connman is not suitable for the setup script.
There are other connman related scripts in /usr/lib/connman
so moving the wired setup script there.
---
 meta/recipes-connectivity/connman/connman-conf.bb | 8 +++++---
 meta/recipes-connectivity/connman/connman/connman | 4 ++--
 2 files changed, 7 insertions(+), 5 deletions(-)

Patch

diff --git a/meta/recipes-connectivity/connman/connman-conf.bb b/meta/recipes-connectivity/connman/connman-conf.bb
index 7b99953..6ecfbfb 100644
--- a/meta/recipes-connectivity/connman/connman-conf.bb
+++ b/meta/recipes-connectivity/connman/connman-conf.bb
@@ -6,16 +6,18 @@  LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=80
 SRC_URI_append_qemuall = "file://wired.config \
                           file://wired-setup \
                          "
-PR = "r1"
+PR = "r2"
 
 PACKAGE_ARCH = "${MACHINE_ARCH}"
 
+FILES_${PN} = "${localstatedir}/* ${libdir}/*"
+
 do_install() {
     #Configure Wired network interface in case of qemu* machines
     if test -e ${WORKDIR}/wired.config && test -e ${WORKDIR}/wired-setup; then
         install -d ${D}${localstatedir}/lib/connman
         install -m 0644 ${WORKDIR}/wired.config ${D}${localstatedir}/lib/connman
-        install -d ${D}${sysconfdir}/connman
-        install -m 0755 ${WORKDIR}/wired-setup ${D}${sysconfdir}/connman
+        install -d ${D}${libdir}/connman
+        install -m 0755 ${WORKDIR}/wired-setup ${D}${libdir}/connman
     fi
 }
diff --git a/meta/recipes-connectivity/connman/connman/connman b/meta/recipes-connectivity/connman/connman/connman
index ffd7fac..a111f60 100644
--- a/meta/recipes-connectivity/connman/connman/connman
+++ b/meta/recipes-connectivity/connman/connman/connman
@@ -32,8 +32,8 @@  do_start() {
 		ethn=`ifconfig | grep eth | sed -e "s/\(eth[0-9]\)\(.*\)/\1/"`
 		EXTRA_PARAM="-I $ethn"
 	fi
-	if [ -f /etc/connman/wired-setup ] ; then
-		. /etc/connman/wired-setup
+	if [ -f /usr/lib/connman/wired-setup ] ; then
+		. /usr/lib/connman/wired-setup
 	fi
 	$DAEMON $EXTRA_PARAM
 }