diff options
author | Patrick Williams <patrick@stwcx.xyz> | 2016-08-17 14:31:25 -0500 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2016-08-22 16:43:26 +0000 |
commit | 60f9d69e016b11c468c98ea75ba0a60c44afbbc4 (patch) | |
tree | ecb49581a9e41a37943c22cd9ef3f63451b20ee7 /import-layers/yocto-poky/meta/recipes-devtools/tcf-agent/tcf-agent/tcf-agent.init | |
parent | e18c61205e0234b03697129c20cc69c9b3940efc (diff) | |
download | blackbird-openbmc-60f9d69e016b11c468c98ea75ba0a60c44afbbc4.tar.gz blackbird-openbmc-60f9d69e016b11c468c98ea75ba0a60c44afbbc4.zip |
yocto-poky: Move to import-layers subdir
We are going to import additional layers, so create a subdir to
hold all of the layers that we import with git-subtree.
Change-Id: I6f732153a22be8ca663035c518837e3cc5ec0799
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Diffstat (limited to 'import-layers/yocto-poky/meta/recipes-devtools/tcf-agent/tcf-agent/tcf-agent.init')
-rwxr-xr-x | import-layers/yocto-poky/meta/recipes-devtools/tcf-agent/tcf-agent/tcf-agent.init | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/tcf-agent/tcf-agent/tcf-agent.init b/import-layers/yocto-poky/meta/recipes-devtools/tcf-agent/tcf-agent/tcf-agent.init new file mode 100755 index 000000000..6303280aa --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/tcf-agent/tcf-agent/tcf-agent.init @@ -0,0 +1,75 @@ +#!/bin/sh +### BEGIN INIT INFO +# Provides: tcf-agent +# Default-Start: 3 5 +# Default-Stop: 0 1 2 6 +# Short-Description: Target Communication Framework agent +### END INIT INFO + +DAEMON_PATH=/usr/sbin/tcf-agent +DAEMON_NAME=`basename $DAEMON_PATH` + +. /etc/init.d/functions + +test -x $DAEMON_PATH || exit 0 + +PATH=/sbin:/usr/sbin:/bin:/usr/bin +export PATH + +RETVAL=0 + +case "$1" in + start) + echo -n "Starting $DAEMON_NAME: " + $DAEMON_PATH -d -L- -l0 + RETVAL=$? + if [ $RETVAL -eq 0 ] ; then + echo "OK" + touch /var/lock/subsys/$DAEMON_NAME + else + echo "FAIL" + fi + ;; + + stop) + echo -n "Stopping $DAEMON_NAME: " + count=0 + while [ -n "`/bin/pidof $DAEMON_PATH`" -a $count -lt 10 ] ; do + killproc $DAEMON_PATH >& /dev/null + sleep 1 + RETVAL=$? + if [ $RETVAL != 0 -o -n "`/bin/pidof $DAEMON_PATH`" ] ; then + sleep 3 + fi + count=`expr $count + 1` + done + rm -f /var/lock/subsys/$DAEMON_NAME + if [ -n "`/bin/pidof $DAEMON_PATH`" ] ; then + echo "FAIL" + else + echo "OK" + fi + ;; + + restart) + $0 stop + sleep 1 + $0 start + ;; + + status) + status $DAEMON_NAME + RETVAL=$? + ;; + + condrestart) + [ -f /var/lock/subsys/$DAEMON_NAME ] && $0 restart + ;; + + *) + echo "usage: $0 { start | stop | status | restart | condrestart | status }" + ;; +esac + +exit $RETVAL + |