rc scripts

David Allen the.real.david.allen at gmail.com
Mon Jun 30 10:40:38 UTC 2008


On Fri, Jun 27, 2008 at 3:01 PM, Derek Ragona
<derek at computinginnovations.com> wrote:
>
> At 04:11 PM 6/27/2008, David Allen wrote:
>>
>> I need to an '-s' flag to the execution of openntpd's rc script:
>> 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.
>
> 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.

Using set -x didn't occur to me, but from a brief look at the output,
it seemed to pick up (which, I guess, it shouldn't) my
openntpd_flags="-s" in /etc/rc.conf.  But even then, the logfile was
populated with nothing more than "Starting openntpd", so I'm back to
where I started.

I guess I'll be filing this in my WTF notes, and call it a day.


More information about the freebsd-questions mailing list