Date: Fri, 17 Jul 2009 07:14:26 GMT From: "Philip M. Gollucci" <pgollucci@FreeBSD.org> To: FreeBSD-gnats-submit@FreeBSD.org Cc: joseph@randomnetworks.com Subject: ports/136850: [PATCH] security/swatch: USE_RC_SUBR != yes Message-ID: <200907170714.n6H7EQMQ043559@freefall.freebsd.org> Resent-Message-ID: <200907170720.n6H7K4wb045961@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 136850 >Category: ports >Synopsis: [PATCH] security/swatch: USE_RC_SUBR != yes >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: Fri Jul 17 07:20:04 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Philip M. Gollucci >Release: FreeBSD 7.2-STABLE i386 >Organization: RideCharge Inc. >Environment: System: FreeBSD freefall.freebsd.org 7.2-STABLE FreeBSD 7.2-STABLE #38 r194101: Sat Jun 13 11:12:24 UTC >Description: Added file(s): - files/swatch.in Removed file(s): - files/swatch.sh Port maintainer (joseph@randomnetworks.com) is cc'd. Generated with FreeBSD Port Tools 0.77 >How-To-Repeat: >Fix: --- swatch-3.2.1_1.patch begins here --- Index: Makefile =================================================================== RCS file: /home/pcvs/ports/security/swatch/Makefile,v retrieving revision 1.23 diff -u -u -r1.23 Makefile --- Makefile 12 Mar 2008 01:28:27 -0000 1.23 +++ Makefile 17 Jul 2009 07:14:15 -0000 @@ -22,21 +22,14 @@ PERL_CONFIGURE= yes CONFIGURE_ARGS= INSTALLMAN1DIR=${PREFIX}/man/man1 -USE_RC_SUBR= yes +USE_RC_SUBR= ${PORTNAME} MAN1= swatch.1 MAN3= Swatch::Actions.3 Swatch::Throttle.3 Swatch::Threshold.3 -RC_SCRIPTS_SUB= PREFIX=${PREFIX} RC_SUBR=${RC_SUBR} - post-patch: - ${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \ - ${FILESDIR}/swatch.sh > ${WRKSRC}/swatch.sh ${FIND} ${WRKSRC} -name "*.orig" -delete -post-install: - ${INSTALL_SCRIPT} ${WRKSRC}/swatch.sh ${PREFIX}/etc/rc.d - .include <bsd.port.pre.mk> .if ${PERL_LEVEL} < 500800 Index: pkg-plist =================================================================== RCS file: /home/pcvs/ports/security/swatch/pkg-plist,v retrieving revision 1.9 diff -u -u -r1.9 pkg-plist --- pkg-plist 22 Feb 2007 09:57:53 -0000 1.9 +++ pkg-plist 17 Jul 2009 07:14:15 -0000 @@ -1,5 +1,4 @@ bin/swatch -etc/rc.d/swatch.sh %%SITE_PERL%%/Swatch/Actions.pm %%SITE_PERL%%/Swatch/Threshold.pm %%SITE_PERL%%/Swatch/Throttle.pm Index: files/swatch.in =================================================================== RCS file: files/swatch.in diff -N files/swatch.in --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/swatch.in 17 Jul 2009 07:14:15 -0000 @@ -0,0 +1,38 @@ +#!/bin/sh +# +# $FreeBSD: ports/security/swatch/files/swatch.sh,v 1.3 2008/03/12 01:28:28 gahr Exp $ +# +# PROVIDE: swatch +# REQUIRE: DAEMON +# +# To enable multiple instance of swatch, add lines like below to +# /etc/rc.conf. +# +# swatch_enable="YES" +# swatch_rules="1 2 3" +# swatch_1_flags="--config-file=/rc --tail-file=/log --daemon --pid-file=/pid" +# swatch_1_user="nobody" +# swatch_1_chdir="/var/tmp" +# swatch_1_pidfile="/pid" +# swatch_2_flags="blah, blah" +# swatch_3_flags="blah, blah" + +. %%RC_SUBR%% + +name=swatch +rcvar=`set_rcvar` + +command=%%PREFIX%%/bin/swatch +procname=%%PREFIX%%/bin/perl + +load_rc_config ${name} + +if [ -n "${swatch_rules}" ]; then + for i in ${swatch_rules}; do + eval swatch_flags=\$swatch_${i}_flags + eval swatch_user=\$swatch_${i}_user + eval swatch_chdir=\$swatch_${i}_chdir + eval pidfile=\$swatch_${i}_pidfile + run_rc_command "$1" + done +fi Index: files/swatch.sh =================================================================== RCS file: files/swatch.sh diff -N files/swatch.sh --- files/swatch.sh 12 Mar 2008 01:28:28 -0000 1.3 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,38 +0,0 @@ -#!/bin/sh -# -# $FreeBSD: ports/security/swatch/files/swatch.sh,v 1.3 2008/03/12 01:28:28 gahr Exp $ -# -# PROVIDE: swatch -# REQUIRE: DAEMON -# -# To enable multiple instance of swatch, add lines like below to -# /etc/rc.conf. -# -# swatch_enable="YES" -# swatch_rules="1 2 3" -# swatch_1_flags="--config-file=/rc --tail-file=/log --daemon --pid-file=/pid" -# swatch_1_user="nobody" -# swatch_1_chdir="/var/tmp" -# swatch_1_pidfile="/pid" -# swatch_2_flags="blah, blah" -# swatch_3_flags="blah, blah" - -. %%RC_SUBR%% - -name=swatch -rcvar=`set_rcvar` - -command=%%PREFIX%%/bin/swatch -procname=%%PREFIX%%/bin/perl - -load_rc_config ${name} - -if [ -n "${swatch_rules}" ]; then - for i in ${swatch_rules}; do - eval swatch_flags=\$swatch_${i}_flags - eval swatch_user=\$swatch_${i}_user - eval swatch_chdir=\$swatch_${i}_chdir - eval pidfile=\$swatch_${i}_pidfile - run_rc_command "$1" - done -fi --- swatch-3.2.1_1.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200907170714.n6H7EQMQ043559>