Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Apr 2008 15:47:16 +0100
From:      Daniel Bye <freebsd-questions@slightlystrange.org>
To:        freebsd-questions@freebsd.org
Subject:   Re: ntpd not starting at boot time
Message-ID:  <20080424144716.GA14477@torus.slightlystrange.org>
In-Reply-To: <48108DA2.1000502@networktest.com>
References:  <48108DA2.1000502@networktest.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--KsGdsel6WgEHnImy
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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.
>=20
> The ntpd process does not start at boot time. These lines exists in=20
> /etc/rc.conf:
>=20
> ntpd_enable=3D"YES"
> ntpd_program=3D"/usr/local/bin/ntpd"
> ntpd_flags=3D"-c /etc/ntp.conf -p /var/run/ntpd.pid"
> ntpd_sync_on_start=3D"YES"
>=20
> Manually running '/etc/rc.d/ntpd start' produces this error:
>=20
> Starting ntpd.
> ERROR:  only one configfile option allowed
>=20
> I've pasted the contents of ntp.conf and /etc/rc.d/ntpd files below.
>=20
> Thanks in advance for clues as to what's missing.



>=20
> ######
> # BEGIN /etc/rc.d/ntpd
> ######
>=20
>=20
> # PROVIDE: ntpd
> # REQUIRE: DAEMON ntpdate cleanvar devfs
> # BEFORE:  LOGIN
> # KEYWORD: nojail
>=20
> . /etc/rc.subr
>=20
> name=3Dntpd
> rcvar=3D`set_rcvar`
> #command=3D"/usr/sbin/${name}"
> command=3D"/usr/local/bin/${name}"
> pidfile=3D"/var/run/${name}.pid"
> start_precmd=3D"ntpd_precmd"
>=20
> load_rc_config $name
>=20
> required_files=3D"${ntpd_config}"
>=20
> ntpd_precmd()
> {
>         rc_flags=3D"-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=3D"-c /path/in/ntpd_config -c /etc/ntp.conf...."

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

Dan

--=20
Daniel Bye
                                                                     _
                                              ASCII ribbon campaign ( )
                                         - against HTML, vCards and  X
                                - proprietary attachments in e-mail / \

--KsGdsel6WgEHnImy
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.8 (FreeBSD)

iEYEARECAAYFAkgQnXQACgkQixf5fBYiFmr/6wCg0DjAWll+Im5H5eie2t0/w6MD
F3kAni147ixTd2ZitAKBMamFDlrwiF3a
=MhKl
-----END PGP SIGNATURE-----

--KsGdsel6WgEHnImy--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080424144716.GA14477>