ports/143102: [PATCH] net/apinger: add a new rc script, move message to pkg-message
Sevan Janiyan
venture37 at geeklan.co.uk
Sat Jan 23 03:50:02 UTC 2010
>Number: 143102
>Category: ports
>Synopsis: [PATCH] net/apinger: add a new rc script, move message to pkg-message
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Sat Jan 23 03:50:01 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator: Sevan Janiyan
>Release: FreeBSD 8.0-RELEASE-p2 amd64
>Organization:
>Environment:
System: FreeBSD newbie.thingamajig-systems.co.uk 8.0-RELEASE-p2 FreeBSD 8.0-RELEASE-p2 #0: Tue Jan 5 21:11:58 UTC
>Description:
move message to pkg-message so users installing by a package recieve the message
add a new rc script which is installed via USE_RC_SUBR
Added file(s):
- files/apinger.in
- files/pkg-message.in
Removed file(s):
- files/apinger.sh
Port maintainer (mich at FreeBSD.org) is cc'd.
Generated with FreeBSD Port Tools 0.99
>How-To-Repeat:
>Fix:
--- apinger-0.6.1_2.patch begins here ---
Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/net/apinger/Makefile,v
retrieving revision 1.14
diff -u -r1.14 Makefile
--- Makefile 16 Jul 2008 15:25:51 -0000 1.14
+++ Makefile 23 Jan 2010 03:33:28 -0000
@@ -17,29 +17,23 @@
COMMENT= An IP device monitoring tool
GNU_CONFIGURE= yes
+USE_RC_SUBR= apinger
+SUB_FILES= pkg-message
OPTIONS= IPV6 "With support for IPv6" on
-.include <bsd.port.pre.mk>
+.include <bsd.port.options.mk>
.if !defined(WITH_IPV6)
CONFIGURE_ARGS+= --disable-ipv6
.endif
-post-extract:
- @${SED} -e "s,%%PREFIX%%,${PREFIX},g" ${FILESDIR}/apinger.sh \
- > ${WRKSRC}/apinger.sh
+.include <bsd.port.pre.mk>
post-install:
${INSTALL_DATA} ${WRKSRC}/src/apinger.conf ${PREFIX}/etc/apinger.conf.sample
- ${INSTALL_SCRIPT} ${WRKSRC}/apinger.sh ${PREFIX}/etc/rc.d/apinger.sh.sample
.if !defined(BATCH)
- @${ECHO_MSG} ""
- @${ECHO_MSG} "###############################################################################"
- @${ECHO_MSG} "# Please edit ${PREFIX}/etc/apinger.conf to your needs. #"
- @${ECHO_MSG} "# A sample shell script has been installed in ${PREFIX}/etc/rc.d/ #"
- @${ECHO_MSG} "# rename it to automatically start apinger at boot. #"
- @${ECHO_MSG} "###############################################################################"
+ @${CAT} ${PKGMESSAGE}
.endif
.if !defined(NOPORTDOCS)
Index: pkg-plist
===================================================================
RCS file: /home/ncvs/ports/net/apinger/pkg-plist,v
retrieving revision 1.5
diff -u -r1.5 pkg-plist
--- pkg-plist 3 Nov 2004 13:14:08 -0000 1.5
+++ pkg-plist 23 Jan 2010 03:33:28 -0000
@@ -1,6 +1,5 @@
sbin/apinger
etc/apinger.conf.sample
-etc/rc.d/apinger.sh.sample
%%PORTDOCS%%%%DOCSDIR%%/README
%%PORTDOCS%%%%DOCSDIR%%/NEWS
%%PORTDOCS%%%%DOCSDIR%%/AUTHORS
Index: files/apinger.in
===================================================================
RCS file: files/apinger.in
diff -N files/apinger.in
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ files/apinger.in 23 Jan 2010 03:33:28 -0000
@@ -0,0 +1,28 @@
+#!/bin/sh
+
+# $FreeBSD$
+#
+# PROVIDE: apinger
+# REQUIRE: LOGIN
+# KEYWORD: shutdown
+#
+# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
+# to enable this service:
+#
+# apinger_enable (bool): Set to NO by default.
+# Set it to YES to enable apinger.
+#
+
+. /etc/rc.subr
+
+name="apinger"
+rcvar=${name}_enable
+
+command=%%PREFIX%%/sbin/${name}
+pidfile=/var/run/${name}.pid
+
+load_rc_config $name
+
+: ${apinger_enable="NO"}
+
+run_rc_command "$1"
Index: files/apinger.sh
===================================================================
RCS file: files/apinger.sh
diff -N files/apinger.sh
--- files/apinger.sh 4 Jun 2003 09:49:31 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,19 +0,0 @@
-#!/bin/sh
-
-case $1 in
-start)
- [ -x %%PREFIX%%/sbin/apinger ] && %%PREFIX%%/sbin/apinger && echo -n ' apinger'
- ;;
-restart)
- killall -HUP apinger && echo -n ' apinger'
- ;;
-stop)
- killall apinger && echo -n ' apinger'
- ;;
-*)
- echo "Usage: `basename $0` {start|stop}" >&2
- exit 64
- ;;
-esac
-
-exit 0
Index: files/pkg-message.in
===================================================================
RCS file: files/pkg-message.in
diff -N files/pkg-message.in
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ files/pkg-message.in 23 Jan 2010 03:33:28 -0000
@@ -0,0 +1,5 @@
+#########################################################################
+# Please copy: #
+# ${PREFIX}/etc/apinger.conf.sample to ${PREFIX}/etc/apinger.conf #
+# & edit to your needs. #
+#########################################################################
--- apinger-0.6.1_2.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list