connman-conf fixes
v2 cover connman-conf fixes
Hi,
noticed some issues with connman-conf that is used to setup the ethernet in qemu image.
v2:
- change the location of wired-setup in connman init.d script
Cheers,
Jukka
Jukka Rissanen (2):
connman-conf: Move the setup script into /usr/lib/connman
connman-conf: Avoid appending IPv4 address
meta/recipes-connectivity/connman/connman-conf.bb | 8 +++++--- .../recipes-connectivity/connman/connman-conf/qemuall/wired-setup | 2 +- meta/recipes-connectivity/connman/connman/connman | 4 ++-- 3 files changed, 8 insertions(+), 6 deletions(-)
Signature · 1 line
1.7.11.4
PATCH v2 1/2 connman-conf: Move the setup script into /usr/lib/connman
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(-)
meta/recipes-connectivity/connman/connman-conf.bb +5 -3
@@ -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 }
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 /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 }
Signature · 1 line
1.7.11.4
PATCH v2 2/2 connman-conf: Avoid appending IPv4 address
In reply to Jukka RissanenIf run more than once, the IP addresses would be appended to IPv4 variable. Avoid that by rewriting the IPv4 always.
--- meta/recipes-connectivity/connman/connman-conf/qemuall/wired-setup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-connectivity/connman/connman-conf/qemuall/wired-setup +1 -1
@@ -12,5 +12,5 @@ if [ "x$NET_CONF" = "x" ]; then rm -f ${CONFIGF} else # Setup a connman config accordingly - sed -i -e "s|^\(IPv4 =\)|\1 ${NET_CONF}|" ${CONFIGF} + sed -i -e "s|^IPv4 =.*|IPv4 = ${NET_CONF}|" ${CONFIGF} fi
Signature · 1 line
1.7.11.4