From owner-freebsd-questions@FreeBSD.ORG Fri Jun 27 22:02:27 2008 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 7C4571065680 for ; Fri, 27 Jun 2008 22:02:27 +0000 (UTC) (envelope-from derek@computinginnovations.com) Received: from betty.computinginnovations.com (mail.computinginnovations.com [64.81.227.250]) by mx1.freebsd.org (Postfix) with ESMTP id 34B9E8FC1E for ; Fri, 27 Jun 2008 22:02:26 +0000 (UTC) (envelope-from derek@computinginnovations.com) Received: from p28.computinginnovations.com (dhcp-10-20-30-100.computinginnovations.com [10.20.30.100]) (authenticated bits=0) by betty.computinginnovations.com (8.14.2/8.14.2) with ESMTP id m5RM1rIe020952; Fri, 27 Jun 2008 17:01:53 -0500 (CDT) (envelope-from derek@computinginnovations.com) Message-Id: <6.0.0.22.2.20080627165741.025edf40@mail.computinginnovations.com> X-Sender: derek@mail.computinginnovations.com X-Mailer: QUALCOMM Windows Eudora Version 6.0.0.22 Date: Fri, 27 Jun 2008 17:01:49 -0500 To: "David Allen" , freebsd-questions@freebsd.org From: Derek Ragona In-Reply-To: <2daa8b4e0806271411p709ad002o3137c7eb4ff53bac@mail.gmail.co m> References: <2daa8b4e0806271411p709ad002o3137c7eb4ff53bac@mail.gmail.com> Mime-Version: 1.0 X-Antivirus: avast! (VPS 080627-0, 06/27/2008), Outbound message X-Antivirus-Status: Clean X-Virus-Scanned: ClamAV 0.93/6806/Wed Apr 16 15:50:16 2008 on betty.computinginnovations.com X-Virus-Status: Clean X-ComputingInnovations-MailScanner-Information: Please contact the ISP for more information X-MailScanner-ID: m5RM1rIe020952 X-ComputingInnovations-MailScanner: Found to be clean X-ComputingInnovations-MailScanner-From: derek@computinginnovations.com X-Spam-Status: No Content-Type: text/plain; charset="us-ascii"; format=flowed X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: Re: rc scripts 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: Fri, 27 Jun 2008 22:02:27 -0000 At 04:11 PM 6/27/2008, David Allen wrote: >I need to an '-s' flag to the execution of openntpd's rc script: > > # PROVIDE: openntpd > # REQUIRE: DAEMON > # BEFORE: LOGIN > # KEYWORD: nojail > > . /etc/rc.subr > > name=openntpd > rcvar=`set_rcvar` > command=/usr/local/sbin/ntpd > required_files=/usr/local/etc/ntpd.conf > openntpd_enable=${openntpd_enable:-"NO"} > load_rc_config $name > run_rc_command "$1" > >The problems I'm having are multiple. First, the program doesn't offer >any logging, and running it with the "do not daemonize" switch with > > # /usr/local/sbin/ntpd -d 2>&1 > logfile > >yields no output. > >Then, I'm not sure I understand everything I'm reading in rc.subr(8), but >from trial error, I've discovered that modifying the script's "command" >variable doesn't work, nor does adding the usual "scriptname_flags" >directive to /etc/rc.conf. > >Comments, questions and complaints all welcomed. Add: set -x at the top of the script and run the output to a file as you were doing. I would add a path to the logfile though and don't worry about the daemon like: /usr/local/sbin/ntpd start 2>&1 >/tmp/logfile Then you can kill it off and see what the startup looked like in the logfile. -Derek -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.