From owner-freebsd-stable@FreeBSD.ORG Thu May 13 00:57:43 2010 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 47746106566C for ; Thu, 13 May 2010 00:57:43 +0000 (UTC) (envelope-from cswiger@mac.com) Received: from asmtpout026.mac.com (asmtpout026.mac.com [17.148.16.101]) by mx1.freebsd.org (Postfix) with ESMTP id 2E9E78FC0C for ; Thu, 13 May 2010 00:57:42 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=us-ascii Received: from cswiger1.apple.com ([17.209.4.71]) by asmtp026.mac.com (Sun Java(tm) System Messaging Server 6.3-8.01 (built Dec 16 2008; 32bit)) with ESMTPSA id <0L2C00J8U2O6S180@asmtp026.mac.com> for freebsd-stable@freebsd.org; Wed, 12 May 2010 17:57:42 -0700 (PDT) X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 ipscore=0 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx engine=6.0.2-1004200000 definitions=main-1005120173 X-Proofpoint-Virus-Version: vendor=fsecure engine=1.12.8161:2.4.5,1.2.40,4.0.166 definitions=2010-05-12_04:2010-02-06, 2010-05-13, 2010-05-12 signatures=0 From: Chuck Swiger In-reply-to: <20100512193814.L37652@shell.xecu.net> Date: Wed, 12 May 2010 17:57:42 -0700 Message-id: <3C6E6C70-756E-407B-97C5-B453138D8294@mac.com> References: <20100512193814.L37652@shell.xecu.net> To: Andy Dills X-Mailer: Apple Mail (2.1078) Cc: freebsd-stable@freebsd.org Subject: Re: Why doesn't this startup script execute on boot? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 May 2010 00:57:43 -0000 Hi-- On May 12, 2010, at 4:46 PM, Andy Dills wrote: > I'm working on getting p0f integrated with amavisd-new. Everything is > great, with the exception that I can't get the neccessary commands to > execute on boot. The amavid-p0fanalyzer script should have been installed if you used the port: % cat /usr/local/etc/rc.d/amavis-p0fanalyzer #!/bin/sh # $FreeBSD: ports/security/amavisd-new/files/amavis-p0fanalyzer.sh.in,v 1.6 2007/03/30 21:52:10 gabor Exp $ # PROVIDE: amavis_p0fanalyzer # REQUIRE: DAEMON # BEFORE: amavisd amavis_p0fanalyzer_enable="${amavis_p0fanalyzer_enable-NO}" amavis_p0fanalyzer_p0f_filter="${amavis_p0fanalyzer_p0f_filter-"tcp dst port 25"}" amavis_p0fanalyzer_pidfile1="${amavis_p0fanalyzer_pidfile1-/var/run/p0fanalyzer1.pid}" amavis_p0fanalyzer_pidfile2="${amavis_p0fanalyzer_pidfile2-/var/run/p0fanalyzer2.pid}" amavis_p0f_daemon_flags="${amavis_p0f_daemon_flags--l}" amavis_p0fanalyzer_flags="${amavis_p0fanalyzer_flags-2345}" . /etc/rc.subr name="amavis_p0fanalyzer" rcvar=`set_rcvar` start_cmd=p0fanalyzer_start stop_cmd=p0fanalyzer_stop p0fanalyzer_start() { echo "Starting p0f-analyzer." && \ /usr/sbin/daemon -p ${amavis_p0fanalyzer_pidfile1} \ /usr/local/bin/p0f ${amavis_p0f_daemon_flags} \ "${amavis_p0fanalyzer_p0f_filter}" 2>&1 | \ /usr/sbin/daemon -p ${amavis_p0fanalyzer_pidfile2} \ /usr/local/sbin/p0f-analyzer.pl ${amavis_p0fanalyzer_flags} } p0fanalyzer_stop() { /bin/kill `cat ${amavis_p0fanalyzer_pidfile2}` && rm ${amavis_p0fanalyzer_pidfile2} /bin/kill `cat ${amavis_p0fanalyzer_pidfile1}` && rm ${amavis_p0fanalyzer_pidfile1} } load_rc_config $name run_rc_command "$1" Regards, -- -Chuck