3 # ntpd init.d script for ntpdc from ntp.isc.org
4 test -x /usr/bin/ntpd -a -r /etc/ntp.conf || exit 0
6 test -r /etc/default/rcS && . /etc/default/rcS
8 # Functions to do individual actions
10 # If TICKADJ is set we *must* adjust it before we start, because the
11 # driftfile relies on the correct setting
12 test -n "$TICKADJ" -a -x /usr/bin/tickadj && {
13 echo -n "Setting tick to $TICKADJ: "
14 /usr/bin/tickadj "$TICKADJ"
19 # The -g option allows ntpd to step the time to correct it just
20 # once. The daemon will exit if the clock drifts too much after
21 # this. If ntpd seems to disappear after a while assume TICKADJ
22 # above is set to a totally incorrect value.
23 echo -n "Starting ntpd: "
24 start-stop-daemon --start -x /usr/bin/ntpd -- -p /var/run/ntp.pid "$@"
28 echo -n "Stopping ntpd: "
29 start-stop-daemon --stop -p /var/run/ntp.pid
47 # Don't reset the tick here
52 # Must do this by hand, but don't do -g
57 echo "Usage: ntpd { start | stop | restart | reload }" >&2