connman: replace hardcoded path in init script and systemd service
PATCH v2 1/1 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]
--- meta/recipes-connectivity/connman/connman.inc | 3 ++- meta/recipes-connectivity/connman/connman/connman | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-)
meta/recipes-connectivity/connman/connman.inc +2 -1
@@ -47,7 +47,7 @@ INITSCRIPT_NAME = "connman" INITSCRIPT_PARAMS = "start 05 5 2 3 . stop 22 0 1 6 ." SYSTEMD_SERVICE_${PN} = "connman.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
@@ -73,6 +73,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}
meta/recipes-connectivity/connman/connman/connman +2 -2
@@ -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 }
Signature · 1 line
1.8.1.4
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Stefan Stanacar
Sent: Tuesday, May 14, 2013 7:22 PM
To: [email protected]
Subject: [OE-core] [PATCH v2] 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]
--- meta/recipes-connectivity/connman/connman.inc | 3 ++- meta/recipes-connectivity/connman/connman/connman | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-)
meta/recipes-connectivity/connman/connman.inc +1 -1
@@ -47,7 +47,7 @@ INITSCRIPT_NAME = "connman" INITSCRIPT_PARAMS = "start 05 5 2 3 . stop 22 0 1 6 ." SYSTEMD_SERVICE_${PN} = "connman.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 @@ -73,6 +73,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}
meta/recipes-connectivity/connman/connman/connman +2 -2
@@ -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 }
--
1.8.1.4
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core