From 17ea9f17b217a5ad58e70315add9a17ff729caed Mon Sep 17 00:00:00 2001 From: Thomas Cort Date: Tue, 2 Apr 2013 02:56:50 +0000 Subject: [PATCH] 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 --- etc/rs.inet | 2 ++ etc/usr/rc | 1 + 2 files changed, 3 insertions(+) diff --git a/etc/rs.inet b/etc/rs.inet index 57c458827..7bd1a032e 100755 --- a/etc/rs.inet +++ b/etc/rs.inet @@ -60,6 +60,7 @@ service down "$1" kill_by_name dhcpd kill_by_name nonamed kill_by_name syslogd +kill_by_name ntpd # Wait a moment to let daemons clean themselves up sleep 3 @@ -73,6 +74,7 @@ else fi daemonize nonamed -L daemonize syslogd +test -f /etc/ntpd.conf && daemonize ntpd # Restart SSH daemon if installed and running if [ -f /usr/pkg/etc/rc.d/sshd ] diff --git a/etc/usr/rc b/etc/usr/rc index 6c14e3e5d..73b0a489d 100644 --- a/etc/usr/rc +++ b/etc/usr/rc @@ -210,6 +210,7 @@ start) # The last daemon has been started, so close the list: echo . fi + test -f /etc/ntpd.conf && daemonize ntpd fi if [ "$net" ]