rc: launch ntpd if /etc/ntpd.conf is present.

Example of a basic ntpd.conf file for an ntp client:

------ CUT & PASTE BETWEEN DASHES --------
servers pool.ntp.org
------------------------------------------

Do `man ntpd.conf` for more info on ntpd.conf
This commit is contained in:
Thomas Cort 2013-04-02 02:56:50 +00:00
parent c5bc7d0867
commit 17ea9f17b2
2 changed files with 3 additions and 0 deletions

View File

@ -60,6 +60,7 @@ service down "$1"
kill_by_name dhcpd kill_by_name dhcpd
kill_by_name nonamed kill_by_name nonamed
kill_by_name syslogd kill_by_name syslogd
kill_by_name ntpd
# Wait a moment to let daemons clean themselves up # Wait a moment to let daemons clean themselves up
sleep 3 sleep 3
@ -73,6 +74,7 @@ else
fi fi
daemonize nonamed -L daemonize nonamed -L
daemonize syslogd daemonize syslogd
test -f /etc/ntpd.conf && daemonize ntpd
# Restart SSH daemon if installed and running # Restart SSH daemon if installed and running
if [ -f /usr/pkg/etc/rc.d/sshd ] if [ -f /usr/pkg/etc/rc.d/sshd ]

View File

@ -210,6 +210,7 @@ start)
# The last daemon has been started, so close the list: # The last daemon has been started, so close the list:
echo . echo .
fi fi
test -f /etc/ntpd.conf && daemonize ntpd
fi fi
if [ "$net" ] if [ "$net" ]