ports/133267: [PATCH] sysutils/watchfolder: provide rc_subr script
Alexander Logvinov
ports at logvinov.com
Wed Apr 1 11:00:08 UTC 2009
>Number: 133267
>Category: ports
>Synopsis: [PATCH] sysutils/watchfolder: provide rc_subr script
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: update
>Submitter-Id: current-users
>Arrival-Date: Wed Apr 01 11:00:04 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator: Alexander Logvinov
>Release: FreeBSD 6.4-RELEASE i386
>Organization:
>Environment:
>Description:
Provide rc_subr script
>How-To-Repeat:
>Fix:
Index: Makefile
===================================================================
RCS file: /home/pcvs/ports/sysutils/watchfolder/Makefile,v
retrieving revision 1.6
diff -u -r1.6 Makefile
--- Makefile 27 Mar 2009 09:53:34 -0000 1.6
+++ Makefile 1 Apr 2009 10:51:19 -0000
@@ -7,6 +7,7 @@
PORTNAME= watchfolder
PORTVERSION= 0.3.3
+PORTREVISION= 1
CATEGORIES= sysutils
MASTER_SITES= http://dstunrea.sdf-eu.org/files/ \
CRITICAL
@@ -17,6 +18,7 @@
MAKE_JOBS_SAFE= yes
WRKSRC= ${WRKDIR}/watchd-${PORTVERSION}
+USE_RC_SUBR= watchd
post-patch:
@${REINPLACE_CMD} -e 's|gcc $$(OPT)|${CC} ${CFLAGS}|' \
Index: files/watchd.in
===================================================================
RCS file: files/watchd.in
diff -N files/watchd.in
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ files/watchd.in 1 Apr 2009 10:51:19 -0000
@@ -0,0 +1,29 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+# PROVIDE: watchd
+# REQUIRE: DAEMON
+# KEYWORD: shutdown
+#
+# Add the following line to /etc/rc.conf[.local] to enable watchd
+#
+# watchd_enable (bool): Set to "NO" by default.
+# Set it to "YES" to enable watchd.
+
+. %%RC_SUBR%%
+
+name="watchd"
+rcvar=${name}_enable
+
+load_rc_config $name
+
+: ${watchd_enable="NO"}
+: ${watchd_config="%%PREFIX%%/etc/watchd.conf"}
+: ${watchd_log="/var/log/watchd.log"}
+
+command="%%PREFIX%%/bin/watchd"
+command_args="${watchd_config} >> ${watchd_log}"
+required_files="${watchd_config}"
+
+run_rc_command "$1"
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list