Date: Thu, 18 Aug 2011 18:47:01 GMT From: Paul Schmehl <pauls@utdallas.edu> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/159892: ports, security/barnyard2, port update Message-ID: <201108181847.p7IIl1m7059320@red.freebsd.org> Resent-Message-ID: <201108181850.p7IIo7Rd049526@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 159892 >Category: ports >Synopsis: ports, security/barnyard2, port update >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Thu Aug 18 18:50:07 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Paul Schmehl >Release: 8.2-STABLE >Organization: University of Texas at Dallas >Environment: FreeBSD hostname.utdallas.edu 8.2-STABLE FreeBSD 8.2 STABLE #2: Thu Aug 8 08:09:03 CDT 2011 root@hostname.utdallas.edu:/usr/obj/usr/src/sys GENERIC amd64 >Description: This update patches the files/barnyard2.sh.in file to add functionality to run multiple instances of barnyard. It also makes a minor change to the Makefile. I did not bump PORTREVISION, because this is a non-essential change. If users want to pick up the change, they can force an update of the port. >How-To-Repeat: N/A >Fix: N/A Patch attached with submission follows: Index: Makefile =================================================================== RCS file: /home/ncvs/ports/security/barnyard2/Makefile,v retrieving revision 1.9 diff -u -r1.9 Makefile --- Makefile 15 May 2011 17:09:38 -0000 1.9 +++ Makefile 18 Aug 2011 18:37:34 -0000 @@ -56,7 +56,7 @@ .if defined(WITH_TCL) USE_TCL= yes CONFIGURE_ARGS+= --with-tcl=${PREFIX}/lib/tcl8.4 -LIB_DEPENDS+= tcl84.1:${PORTSDIR}/lang/tcl84 +LIB_DEPENDS+= tcl84.1:${PORTSDIR}/lang/tcl84 .endif pre-install: Index: files/barnyard2.sh.in =================================================================== RCS file: /home/ncvs/ports/security/barnyard2/files/barnyard2.sh.in,v retrieving revision 1.2 diff -u -r1.2 barnyard2.sh.in --- files/barnyard2.sh.in 27 Mar 2010 00:14:39 -0000 1.2 +++ files/barnyard2.sh.in 18 Aug 2011 18:37:34 -0000 @@ -13,52 +13,18 @@ # Default: -D # barnyard2_conf (str): Barnyard configuration file # Default: %%PREFIX%%/etc/barnyard2.conf +# optional, multi-barnyard2: +# barnyard2_rules="1 2 3" +# barnyard2_1_flags="-D" +# barnyard2_1_pidfile="" +# #$command $flags $args # # USAGE: barnyard2 [-options] # -# General Options: -# -? Show this information -# -c <file> Use configuration file <file> -# -g <gname> Run barnyard gid as <gname> group (or gid) after initialization -# -m <umask> Set umask = <umask> -# -q Quiet. Don't show banner and status report -# -u <uname> Run barnyard uid as <uname> user (or uid) after initialization -# -v Be verbose -# -C <file> Read the classification map from <file> -# -D Run barnyard in background (daemon) mode -# -G <file> Read the gen-msg map from <file> -# -L <dir> Write output files in <dir> -# -R <file> Read the reference map from <file> -# -S <file> Read the sid-msg map from <file> -# -T Test and report on the current configuration -# -U Use UTC for timestamps -# -V Show version and exit -# -# Continual Processing Options: -# -a <dir> Archive processed files to <dir> -# -f <base> Use <base> as the base filename pattern -# -d <dir> Spool files from <dir> -# -n Only process new events -# -w <file> Enable bookmarking using <file> -# -# Batch Processing Mode Options: -# -o Enable batch processing mode -# -# Longname options and their corresponding single char version -# --reference <file> Same as -R -# --classification <file> Same as -C -# --gen-msg <file> Same as -G -# --sid-msg <file> Same as -S -# --pid-path <path> Specify the path for the barnyard PID file -# --create-pidfile Create PID file, even when not in Daemon mode -# --nolock-pidfile Do not try to lock barnyard PID file -# --help Same as -? -# --version Same as -V . /etc/rc.subr name="barnyard2" -load_rc_config $name rcvar=`set_rcvar` # set some defaults : ${barnyard2_enable="NO"} @@ -68,4 +34,17 @@ command="%%PREFIX%%/bin/barnyard2" command_args="-c ${barnyard2_conf} ${barnyard2_flags}" -run_rc_command "$1" +load_rc_config $name + +if [ -n "${barnyard2_rules}" ];then + for i in ${barnyard2_rules}; do + echo -n "$i:" + eval barnyard2_flags=\$barnyard2_${i}_flags + eval pidfile=\$barnyard2_${i}_pidfile + eval barnyard2_conf=\$barnyard2_${i}_conf + command_args="-c $barnyard2_conf -D" + run_rc_command "$1" + done +else + run_rc_command "$1" +fi >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201108181847.p7IIl1m7059320>