diff options
| author | Stefan Stanacar <stefanx.stanacar@intel.com> | 2013-05-14 19:21:35 +0300 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-05-22 17:14:05 +0100 |
| commit | 8721671e83fbf6f1d69ed06781b2b8e206780d35 (patch) | |
| tree | 373e13f31426d80a154364659699ba8ba979781c /meta | |
| parent | 437d0c2122f6685d3b6531dd4daf33c232941803 (diff) | |
| download | poky-8721671e83fbf6f1d69ed06781b2b8e206780d35.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]
(From OE-Core master rev: fca3a884e9cae13a521d840838eee3c01f0b6acf)
(From OE-Core rev: d620e5376c10bc5ff1aa551be4a7d1d635a760c3)
Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
| -rw-r--r-- | meta/recipes-connectivity/connman/connman.inc | 4 | ||||
| -rw-r--r-- | meta/recipes-connectivity/connman/connman/connman | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/meta/recipes-connectivity/connman/connman.inc b/meta/recipes-connectivity/connman/connman.inc index 589ece8583..1412ba41f2 100644 --- a/meta/recipes-connectivity/connman/connman.inc +++ b/meta/recipes-connectivity/connman/connman.inc | |||
| @@ -47,7 +47,7 @@ INITSCRIPT_NAME = "connman" | |||
| 47 | INITSCRIPT_PARAMS = "start 05 5 2 3 . stop 22 0 1 6 ." | 47 | INITSCRIPT_PARAMS = "start 05 5 2 3 . stop 22 0 1 6 ." |
| 48 | 48 | ||
| 49 | SYSTEMD_SERVICE_${PN} = "connman.service" | 49 | SYSTEMD_SERVICE_${PN} = "connman.service" |
| 50 | SYSTEMD_WIRED_SETUP = "ExecStartPre=-/usr/lib/connman/wired-setup" | 50 | SYSTEMD_WIRED_SETUP = "ExecStartPre=-${libdir}/connman/wired-setup" |
| 51 | 51 | ||
| 52 | # IMPORTANT: because xuser is shared with rootless X, please make sure the | 52 | # IMPORTANT: because xuser is shared with rootless X, please make sure the |
| 53 | # USERADD_PARAM is in sync with the one in xserver-nodm-init.bb | 53 | # USERADD_PARAM is in sync with the one in xserver-nodm-init.bb |
| @@ -60,6 +60,7 @@ inherit autotools gtk-doc pkgconfig systemd update-rc.d useradd | |||
| 60 | 60 | ||
| 61 | do_configure_append () { | 61 | do_configure_append () { |
| 62 | sed -i "s#ExecStart=#${SYSTEMD_WIRED_SETUP}\nExecStart=#" ${S}/src/connman.service | 62 | sed -i "s#ExecStart=#${SYSTEMD_WIRED_SETUP}\nExecStart=#" ${S}/src/connman.service |
| 63 | |||
| 63 | } | 64 | } |
| 64 | 65 | ||
| 65 | # This allows *everyone* to access ConnMan over DBus, without any access | 66 | # This allows *everyone* to access ConnMan over DBus, without any access |
| @@ -73,6 +74,7 @@ do_install_append() { | |||
| 73 | if ${@base_contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then | 74 | if ${@base_contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then |
| 74 | install -d ${D}${sysconfdir}/init.d | 75 | install -d ${D}${sysconfdir}/init.d |
| 75 | install -m 0755 ${WORKDIR}/connman ${D}${sysconfdir}/init.d/connman | 76 | install -m 0755 ${WORKDIR}/connman ${D}${sysconfdir}/init.d/connman |
| 77 | sed -i s%@LIBDIR@%${libdir}% ${D}${sysconfdir}/init.d/connman | ||
| 76 | fi | 78 | fi |
| 77 | 79 | ||
| 78 | install -d ${D}${bindir} | 80 | 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() { | |||
| 32 | ethn=`ifconfig | grep eth | sed -e "s/\(eth[0-9]\)\(.*\)/\1/"` | 32 | ethn=`ifconfig | grep eth | sed -e "s/\(eth[0-9]\)\(.*\)/\1/"` |
| 33 | EXTRA_PARAM="-I $ethn" | 33 | EXTRA_PARAM="-I $ethn" |
| 34 | fi | 34 | fi |
| 35 | if [ -f /usr/lib/connman/wired-setup ] ; then | 35 | if [ -f @LIBDIR@/connman/wired-setup ] ; then |
| 36 | . /usr/lib/connman/wired-setup | 36 | . @LIBDIR@/connman/wired-setup |
| 37 | fi | 37 | fi |
| 38 | $DAEMON $EXTRA_PARAM | 38 | $DAEMON $EXTRA_PARAM |
| 39 | } | 39 | } |
