3 # $NetBSD: ntpd,v 1.6 2002/03/22 04:33:59 thorpej Exp $
10 # KEYWORD: FreeBSD NetBSD
14 case `${CMD_OSTYPE}` in
20 start_precmd="ntpd_precmd"
25 command="/usr/sbin/ntpd"
26 pidfile="/var/run/ntpd.pid"
27 required_files="/etc/ntp.conf"
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"