From owner-freebsd-questions@FreeBSD.ORG Wed May 12 20:50:51 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 828F6106566B for ; Wed, 12 May 2010 20:50:51 +0000 (UTC) (envelope-from andy@xecu.net) Received: from shell.xecu.net (shell.xecu.net [216.127.136.216]) by mx1.freebsd.org (Postfix) with ESMTP id 639A18FC0A for ; Wed, 12 May 2010 20:50:51 +0000 (UTC) Received: from shell.xecu.net (shell.xecu.net [216.127.136.216]) by shell.xecu.net (Postfix) with ESMTP id A192D251BFB for ; Wed, 12 May 2010 16:20:12 -0400 (EDT) Date: Wed, 12 May 2010 16:20:12 -0400 (EDT) From: Andy Dills To: freebsd-questions@freebsd.org Message-ID: <20100512161505.H37652@shell.xecu.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Why doesn't this startup script run? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 May 2010 20:50:51 -0000 I'm working on integrating p0f with amavisd-new, and the command I need to run at startup is a little unwieldy: p0f -l 'tcp dst port 25' 2>&1 | /usr/local/bin/p0f-analyzer.pl 2345 & At first, I tried putting that in /etc/rc.local. No luck, don't know why it doesn't run. Ok, I tell myself, rc.local is a dinosaur anyway, take a second and make a simple rc.d script. So, I made /usr/local/etc/rc.d/p0fd containing: --- #!/bin/sh # . "/etc/rc.subr" name="p0f" rcvar=`set_rcvar` command="/usr/local/bin/p0f" command_args="-l 'tcp dst port 25' 2>&1 | /usr/local/bin/p0f-analyzer.pl 2345 &" pidfile="/var/run/$name.pid" # read configuration and set defaults load_rc_config "$name" : ${p0f_enable="NO"} run_rc_command "$1" --- If I run "/usr/local/etc/rc.d/p0fd start" it fires right up. However, it still continues to refuse to run on boot. Any suggestions? (yes, it's executable, and yes I have p0f_enable="YES" in rc.conf) Thanks, Andy --- Andy Dills Xecunet, Inc. www.xecu.net 301-682-9972 ---