From owner-freebsd-ports@FreeBSD.ORG Wed Dec 29 22:49:55 2004 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6400616A4CE for ; Wed, 29 Dec 2004 22:49:55 +0000 (GMT) Received: from smtp.rdsnet.ro (smtp.rdsnet.ro [62.231.74.130]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6002943D45 for ; Wed, 29 Dec 2004 22:49:54 +0000 (GMT) (envelope-from itetcu@people.tecnik93.com) Received: (qmail 2424 invoked by uid 89); 29 Dec 2004 22:56:51 -0000 Received: from unknown (HELO rdsnet.ro) (62.231.74.131) by 0 with SMTP; 29 Dec 2004 22:56:52 -0000 Received: (qmail 18932 invoked from network); 29 Dec 2004 22:49:53 -0000 Received: from unknown (HELO buh.cameradicommercio.ro) (82.76.1.117) by mail.rdsnet.ro with SMTP; 29 Dec 2004 22:49:53 -0000 Received: from it.buh.cameradicommercio.ro (it.buh.cameradicommercio.ro [192.168.0.10]) by buh.cameradicommercio.ro (Postfix) with ESMTP id C05F660D6 for ; Thu, 30 Dec 2004 00:49:52 +0200 (EET) Received: from it.buh.cameradicommercio.ro (localhost.buh.tecnik93.com [127.0.0.1]) by it.buh.cameradicommercio.ro (Postfix) with ESMTP id B445C1F7 for ; Thu, 30 Dec 2004 00:50:39 +0200 (EET) Date: Thu, 30 Dec 2004 00:50:39 +0200 From: Ion-Mihai Tetcu To: ports@FreeBSD.ORG Message-ID: <20041230005039.3363683f@it.buh.cameradicommercio.ro> X-Mailer: Sylpheed-Claws 0.9.13 (GTK+ 1.2.10; i386-portbld-freebsd5.3) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: rc script question X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Dec 2004 22:49:55 -0000 Hi, For the following rc script I have to provide a dspam_flags="--debug" in which case it shouldn't redirect sterr and stout to the bit-bucket and it shouldn't go in background. Could someone tell my how to do it ? I'm circling around for a few hours with no result. #!/bin/sh # # $FreeBSD$ # # PROVIDE: dspam # REQUIRE: NETWORKING SERVERS mysql # BEFORE: LOGIN mail # KEYWORD: shutdown # # Add the following lines to /etc/rc.conf[.local] to enable dspam: # dspam_enable="YES" # and dspam_flags="--debug" to keep dspam in forground and have debug msgs # . /etc/rc.subr name=dspam rcvar=`set_rcvar` command=/usr/local/bin/${name} command_args="--daemon 2>&1 &" pidfile=/var/run/${name}.pid required_dirs=/var/db/dspam required_files=/usr/local/etc/${name}.conf extra_commands=reload reload() { kill -HUP `cat $pidfile` } # set defaults dspam_enable=${dspam_enable:-"NO"} load_rc_config $name run_rc_command "$1 Thanks, -- IOnut Unregistered ;) FreeBSD "user"