From b878cf381de0a0d158f1e97cf8726ea1756fd2fa Mon Sep 17 00:00:00 2001 From: Adrian Dudau Date: Fri, 29 Jan 2016 14:12:23 +0100 Subject: connman: Rewrite to a patch to the connman file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The original .bbappend was adding a new "connman" file that replaced the one provided in the original recipe. This meant that any changes in the original file from poky would be overwritten. The .bbappend now patches the connman file so that any changes in it are either included or caught with merge conflict. To achieve this I did an artifice of copying the connman file in S to be patched by do_patch, then copied it back in WORKDIR to be installed on target by do_install. Also renamed the recipe .bbappend to cover all versions of connman and renamed the files folder. Signed-off-by: Adrian Dudau Signed-off-by: Nora Björklund --- recipes-connectivity/connman/files/connman | 83 ------------------------------ 1 file changed, 83 deletions(-) delete mode 100644 recipes-connectivity/connman/files/connman (limited to 'recipes-connectivity/connman/files/connman') diff --git a/recipes-connectivity/connman/files/connman b/recipes-connectivity/connman/files/connman deleted file mode 100644 index a7b7c7b..0000000 --- a/recipes-connectivity/connman/files/connman +++ /dev/null @@ -1,83 +0,0 @@ -#!/bin/sh - -DAEMON=/usr/sbin/connmand -PIDFILE=/var/run/connmand.pid -DESC="Connection Manager" - -if [ -f /etc/default/connman ] ; then - . /etc/default/connman -fi - -set -e - -nfsroot=0 - -exec 9<&0 < /proc/mounts -while read dev mtpt fstype rest; do - if test $mtpt = "/" ; then - case $fstype in - nfs | nfs4) - nfsroot=1 - break - ;; - *) - ;; - esac - fi -done - -do_start() { - EXTRA_PARAM="" - if test $nfsroot -eq 1 ; then - NET_DEVS=`cat /proc/net/dev | sed -ne 's/^\([a-zA-Z0-9 ]*\):.*$/\1/p'` - NET_ADDR=`cat /proc/cmdline | sed -ne 's/^.*ip=\([^ :]*\).*$/\1/p'` - - if [ ! -z "$NET_ADDR" ]; then - if [ "$NET_ADDR" = dhcp ]; then - ethn=`ifconfig | grep "^eth" | sed -e "s/\(eth[0-9]\)\(.*\)/\1/"` - if [ ! -z "$ethn" ]; then - EXTRA_PARAM="--noipconfig $ethn" - fi - else - for i in $NET_DEVS; do - ADDR=`ifconfig $i | sed 's/addr://g' | sed -ne 's/^.*inet \([0-9.]*\) .*$/\1/p'` - if [ "$NET_ADDR" = "$ADDR" ]; then - EXTRA_PARAM="--noipconfig $i" - break - fi - done - fi - fi - fi - if [ -f @LIBDIR@/connman/wired-setup ] ; then - . @LIBDIR@/connman/wired-setup - fi - $DAEMON $EXTRA_PARAM -} - -do_stop() { - start-stop-daemon --stop --name connmand --quiet -} - -case "$1" in - start) - echo "Starting $DESC" - do_start - ;; - stop) - echo "Stopping $DESC" - do_stop - ;; - restart|force-reload) - echo "Restarting $DESC" - do_stop - sleep 1 - do_start - ;; - *) - echo "Usage: $0 {start|stop|restart|force-reload}" >&2 - exit 1 - ;; -esac - -exit 0 -- cgit v1.2.3-54-g00ecf