aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity
diff options
context:
space:
mode:
authorStefan Stanacar <stefanx.stanacar@intel.com>2013-05-14 19:21:35 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-05-16 00:09:41 +0300
commitfca3a884e9cae13a521d840838eee3c01f0b6acf (patch)
tree89e1b96cd71b2a6f4a960d688eeaa5985de40031 /meta/recipes-connectivity
parent0f6c0ed7888603c8d026a671f2acb1515ce799bf (diff)
downloadopenembedded-core-fca3a884e9cae13a521d840838eee3c01f0b6acf.tar.gz
connman: replace hardcoded path in init script and systemd service
The connman init script sources a setup file from /usr/lib/connman, so we end up with no network in qemu multilib enabled images. The init script it's installed by connman and because wired-setup it's installed by another package (connman-conf) we can't use libexecdir here and now (in the init script and systemd service file). Once libexecdir changes from ${libdir}/${bpn} to something else like /usr/libexec we could use that instead of ${libdir}/connman. Changed in v2: - better commit message [YOCTO #4493] Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'meta/recipes-connectivity')
-rw-r--r--meta/recipes-connectivity/connman/connman.inc4
-rw-r--r--meta/recipes-connectivity/connman/connman/connman4
2 files changed, 5 insertions, 3 deletions
diff --git a/meta/recipes-connectivity/connman/connman.inc b/meta/recipes-connectivity/connman/connman.inc
index 8d6f68ceb7..0eb58651c5 100644
--- a/meta/recipes-connectivity/connman/connman.inc
+++ b/meta/recipes-connectivity/connman/connman.inc
@@ -56,7 +56,7 @@ INITSCRIPT_PARAMS = "start 05 5 2 3 . stop 22 0 1 6 ."
SYSTEMD_SERVICE_${PN} = "connman.service"
SYSTEMD_SERVICE_${PN}-vpn = "connman-vpn.service"
-SYSTEMD_WIRED_SETUP = "ExecStartPre=-/usr/lib/connman/wired-setup"
+SYSTEMD_WIRED_SETUP = "ExecStartPre=-${libdir}/connman/wired-setup"
# IMPORTANT: because xuser is shared with rootless X, please make sure the
# USERADD_PARAM is in sync with the one in xserver-nodm-init.bb
@@ -69,6 +69,7 @@ inherit autotools gtk-doc pkgconfig systemd update-rc.d useradd
do_configure_append () {
sed -i "s#ExecStart=#${SYSTEMD_WIRED_SETUP}\nExecStart=#" ${S}/src/connman.service
+
}
# This allows *everyone* to access ConnMan over DBus, without any access
@@ -83,6 +84,7 @@ do_install_append() {
if ${@base_contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then
install -d ${D}${sysconfdir}/init.d
install -m 0755 ${WORKDIR}/connman ${D}${sysconfdir}/init.d/connman
+ sed -i s%@LIBDIR@%${libdir}% ${D}${sysconfdir}/init.d/connman
fi
install -d ${D}${bindir}
diff --git a/meta/recipes-connectivity/connman/connman/connman b/meta/recipes-connectivity/connman/connman/connman
index a111f609dc..67ba7c8a2a 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 /usr/lib/connman/wired-setup ] ; then
- . /usr/lib/connman/wired-setup
+ if [ -f @LIBDIR@/connman/wired-setup ] ; then
+ . @LIBDIR@/connman/wired-setup
fi
$DAEMON $EXTRA_PARAM
}