ntpd not starting at boot time

Daniel Bye freebsd-questions at slightlystrange.org
Thu Apr 24 14:47:24 UTC 2008


On Thu, Apr 24, 2008 at 06:39:46AM -0700, David Newman wrote:
> I've installed ntp-4.2.4p4 from ports on a FreeBSD 6.3/i386 system.
> 
> The ntpd process does not start at boot time. These lines exists in 
> /etc/rc.conf:
> 
> ntpd_enable="YES"
> ntpd_program="/usr/local/bin/ntpd"
> ntpd_flags="-c /etc/ntp.conf -p /var/run/ntpd.pid"
> ntpd_sync_on_start="YES"
> 
> Manually running '/etc/rc.d/ntpd start' produces this error:
> 
> Starting ntpd.
> ERROR:  only one configfile option allowed
> 
> I've pasted the contents of ntp.conf and /etc/rc.d/ntpd files below.
> 
> Thanks in advance for clues as to what's missing.



> 
> ######
> # BEGIN /etc/rc.d/ntpd
> ######
> 
> 
> # PROVIDE: ntpd
> # REQUIRE: DAEMON ntpdate cleanvar devfs
> # BEFORE:  LOGIN
> # KEYWORD: nojail
> 
> . /etc/rc.subr
> 
> name=ntpd
> rcvar=`set_rcvar`
> #command="/usr/sbin/${name}"
> command="/usr/local/bin/${name}"
> pidfile="/var/run/${name}.pid"
> start_precmd="ntpd_precmd"
> 
> load_rc_config $name
> 
> required_files="${ntpd_config}"
> 
> ntpd_precmd()
> {
>         rc_flags="-c ${ntpd_config} ${ntpd_flags}"

You need to set ntpd_config to the path to your config file - as it is
now, you are also setting it in ntpd_flags, which the above line then
expands to something like this:

rc_flags="-c /path/in/ntpd_config -c /etc/ntp.conf...."

So, remove it from your ntpd_flags definition and all should be well!

Dan

-- 
Daniel Bye
                                                                     _
                                              ASCII ribbon campaign ( )
                                         - against HTML, vCards and  X
                                - proprietary attachments in e-mail / \
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20080424/0bc7b274/attachment.pgp


More information about the freebsd-questions mailing list