From 6b4c82f4657bdb56e6b7a56651d6d4bb91a35b8f Mon Sep 17 00:00:00 2001 From: Adrian Dudau Date: Thu, 26 Jun 2014 13:29:32 +0200 Subject: initial commit for Enea Linux 4.0 Migrated from the internal git server on the daisy-enea branch Signed-off-by: Adrian Dudau --- .../recipes-connectivity/connman/files/connman | 61 ++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 meta-eca/recipes-connectivity/connman/files/connman (limited to 'meta-eca/recipes-connectivity/connman/files/connman') diff --git a/meta-eca/recipes-connectivity/connman/files/connman b/meta-eca/recipes-connectivity/connman/files/connman new file mode 100644 index 0000000..4a0017f --- /dev/null +++ b/meta-eca/recipes-connectivity/connman/files/connman @@ -0,0 +1,61 @@ +#!/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 0 ; then + $DAEMON $EXTRA_PARAM + fi +} + +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