From owner-freebsd-stable@FreeBSD.ORG Thu May 13 00:10:52 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 55FF2106566B for ; Thu, 13 May 2010 00:10:52 +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 343D78FC13 for ; Thu, 13 May 2010 00:10:51 +0000 (UTC) Received: from shell.xecu.net (shell.xecu.net [216.127.136.216]) by shell.xecu.net (Postfix) with ESMTP id 3F26C251C0C for ; Wed, 12 May 2010 19:46:25 -0400 (EDT) Date: Wed, 12 May 2010 19:46:25 -0400 (EDT) From: Andy Dills To: freebsd-stable@freebsd.org Message-ID: <20100512193814.L37652@shell.xecu.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: 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:10:52 -0000 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. I started with rc.local and that didn't work. So I made this simple script in /usr/local/etc/rc.d/p0f: --- #!/bin/sh # PROVIDE: p0f # REQUIRE: LOGIN # BEFORE: securelevel # KEYWORD: shutdown . "/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" --- It does not execute on boot (yes, it's executable). It executes just fine by hand. I'm assuming it has something to do with redirecting stdout and stderr to another script which is then shoved into the background? How do I work around this? (BTW, FreeBSD 8.0-STABLE #2: Wed May 12 13:28:18 EDT 2010) Thanks, Andy --- Andy Dills Xecunet, Inc. www.xecu.net 301-682-9972 ---