Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 May 2008 14:06:40 -0500 (CDT)
From:      Paul Schmehl <pauls@utdallas.edu>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/123938: security/barnyard, upgrade the startup script
Message-ID:  <20080523190640.9023B34781C@utd65257.utdallas.edu>
Resent-Message-ID: <200805231910.m4NJA3wE067037@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         123938
>Category:       ports
>Synopsis:       security/barnyard, upgrade the startup script
>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:   Fri May 23 19:10:02 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Paul Schmehl
>Release:        FreeBSD 7.0-STABLE i386
>Organization:
The University of Texas at Dallas
>Environment:
System: FreeBSD hostname.utdallas.edu 7.0-STABLE FreeBSD 7.0-STABLE #6: Wed Apr 16 17:14:28 CDT 2008 root@hostname.utdallas.edu:/usr/obj/usr/src/sys/GENERIC i386


	
>Description:
	Improve the startup script to bring it in line with the correct
	way of doing rc.subr scripts, bump PORTREVISION in the Makefile
	and a minor change to pkg-message.
>How-To-Repeat:
	
>Fix:

	

--- patch-Makefile begins here ---
--- Makefile.orig	2008-05-23 13:39:20.000000000 -0500
+++ Makefile	2008-05-23 13:39:32.000000000 -0500
@@ -7,7 +7,7 @@
 
 PORTNAME=	barnyard
 PORTVERSION=	0.2.0
-PORTREVISION=	3
+PORTREVISION=	4
 CATEGORIES=	security
 MASTER_SITES=	SF
 
--- patch-Makefile ends here ---

--- patch-files-pkg-message.in begins here ---
--- files/pkg-message.in.orig	2008-05-23 13:38:25.000000000 -0500
+++ files/pkg-message.in	2008-05-23 13:39:14.000000000 -0500
@@ -9,6 +9,7 @@
 with the appropriate flags, etc.  See the FreeBSD Handbook for syntax:
 http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/configtuning-rcng.html
 
-For the various options available, type % barnyard -h after install.
+For the various options available, type % barnyard -h after install or read
+the options in the startup script - in %%PREFIX%%/etc/rc.d.
 
 ************************************************************************
--- patch-files-pkg-message.in ends here ---

--- patch-files-barnyard.sh.in begins here ---
--- files/barnyard.sh.in.orig	2008-05-23 13:27:52.000000000 -0500
+++ files/barnyard.sh.in	2008-05-23 13:45:34.000000000 -0500
@@ -12,22 +12,44 @@
 # barnyard_flags (str):		Extra flags passed to barnyard
 #				Default: -D
 # barnyard_conf (str):		Barnyard configuration file
-#				Default: ${PREFIX}/etc/barnyard.conf
+#				Default: %%PREFIX%%/etc/barnyard.conf
 #
+# Usage: barnyard [OPTIONS]...             (continual mode)
+#    or: barnyard -o [OPTIONS]... FILES... (batch mode)
+# Information Options:
+#   -h         Show this help information
+#   -?         Show this help information
+#   -V         Show version and exit
+#   -R         Display processed configuration and exit
+# General Configuration Options:
+#   -c <file>  Use configuration file <file>
+#   -d <dir>   Read spool files from <dir>
+#   -L <dir>   Write output files in <dir>
+#   -v         Increase the verbosity level by 1
+#   -s <file>  Read the sid-msg map from <file>
+#   -g <file>  Read the gen-msg map from <file>
+#   -p <file>  Read the classification map from <file>
+# Continual Processing Mode Options:
+#   -a <dir>   Archive processed files to <dir>
+#   -f <base>  Use <base> as the base unified filename
+#   -n         Only process new events
+#   -w <file>  Enable bookmarking using <file>
+#   -D         Run in daemon mode
+#   -X <file>  Use <file> as the pid file
+# Batch Processing Mode Options:
+#   -o         Enable batch processing mode
 
 . %%RC_SUBR%%
 
 name="barnyard"
+load_rc_config $name
 rcvar=`set_rcvar`
+# set some defaults
+: ${barnyard_enable="NO"}
+: ${barnyard_conf="%%PREFIX%%/etc/barnyard.conf"}
+: ${barnyard_flags="-D"}
 
 command="%%PREFIX%%/bin/barnyard"
-
-load_rc_config $name
-
-[ -z "$barnyard_enable" ]    && barnyard_enable="NO"
-[ -z "$barnyard_conf" ]      && barnyard_conf="%%PREFIX%%/etc/barnyard.conf"
-[ -z "$barnyard_flags" ]     && barnyard_flags="-D"
-
-[ -n "$barnyard_conf" ]      && barnyard_flags="$barnyard_flags -c $barnyard_conf"
+command_args="-c ${barnyard_conf} ${barnyard_flags}"
 
 run_rc_command "$1"
--- patch-files-barnyard.sh.in ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080523190640.9023B34781C>