From d62ee7eaf2ba025c3f64b2d4e10dc7cec4637612 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Wed, 1 Sep 2010 19:09:11 +0100 Subject: packages: Separate out most of the remaining packages into recipes Signed-off-by: Richard Purdie --- .../tcf-agent/tcf-agent/fix_tcf-agent.init.patch | 92 ++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 meta/recipes-devtools/tcf-agent/tcf-agent/fix_tcf-agent.init.patch (limited to 'meta/recipes-devtools/tcf-agent/tcf-agent/fix_tcf-agent.init.patch') diff --git a/meta/recipes-devtools/tcf-agent/tcf-agent/fix_tcf-agent.init.patch b/meta/recipes-devtools/tcf-agent/tcf-agent/fix_tcf-agent.init.patch new file mode 100644 index 0000000000..fa9e458714 --- /dev/null +++ b/meta/recipes-devtools/tcf-agent/tcf-agent/fix_tcf-agent.init.patch @@ -0,0 +1,92 @@ +--- a/Makefile ++++ b/Makefile +@@ -32,7 +32,7 @@ + install -d -m 755 $(INSTALLROOT)$(SBIN) + install -d -m 755 $(INSTALLROOT)$(INIT) + install -c $(BINDIR)/agent -m 755 $(INSTALLROOT)$(SBIN)/tcf-agent +- install -c $(TCF_AGENT_DIR)/main/tcf-agent.init -m 755 $(INSTALLROOT)$(INIT)/tcf-agent ++ install -c tcf-agent.init -m 755 $(INSTALLROOT)$(INIT)/tcf-agent + + clean: + rm -rf $(BINDIR) +--- /dev/null ++++ b/tcf-agent.init +@@ -0,0 +1,78 @@ ++#!/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) ++ if [ -n "`/bin/pidof $DAEMON_PATH`" ] ; then ++ echo "$DAEMON_NAME is running" ++ else ++ echo "$DAEMON_NAME is not running" ++ fi ++ ;; ++ ++ condrestart) ++ [ -f /var/lock/subsys/$DAEMON_NAME ] && $0 restart ++ ;; ++ ++ *) ++ echo "usage: $0 { start | stop | restart | condrestart | status }" ++ ;; ++esac ++ ++exit $RETVAL ++ -- cgit v1.2.3-54-g00ecf