7 # REQUIRE: DAEMON ntpdate cleanvar devfs
15 command="/usr/sbin/${name}"
16 pidfile="/var/run/${name}.pid"
17 start_precmd="ntpd_precmd"
21 required_files="${ntpd_config}"
25 rc_flags="-c ${ntpd_config} ${ntpd_flags}"
27 if checkyesno ntpd_sync_on_start; then
28 rc_flags="-g $rc_flags"
31 if [ -z "$ntpd_chrootdir" ]; then
35 # If running in a chroot cage, ensure that the appropriate files
36 # exist inside the cage, as well as helper symlinks into the cage
39 # As this is called after the is_running and required_dir checks
40 # are made in run_rc_command(), we can safely assume ${ntpd_chrootdir}
41 # exists and ntpd isn't running at this point (unless forcestart
44 if [ ! -c "${ntpd_chrootdir}/dev/clockctl" ]; then
45 rm -f "${ntpd_chrootdir}/dev/clockctl"
46 ( cd /dev ; /bin/pax -rw -pe clockctl "${ntpd_chrootdir}/dev" )
48 ln -fs "${ntpd_chrootdir}/var/db/ntp.drift" /var/db/ntp.drift
50 # Change run_rc_commands()'s internal copy of $ntpd_flags
52 rc_flags="-u ntpd:ntpd -i ${ntpd_chrootdir} $rc_flags"