aboutsummaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorDag-Erling Smørgrav <des@FreeBSD.org>2004-03-29 20:00:54 +0000
committerDag-Erling Smørgrav <des@FreeBSD.org>2004-03-29 20:00:54 +0000
commit696733c7fa8183741c9097debfa553c71a345af9 (patch)
tree19463573e25bca8a69538f01fcb758893516545e /etc
parentbc216e3cd2e323bf176b10b84c28c32e79d307da (diff)
Notes
Diffstat (limited to 'etc')
-rwxr-xr-xetc/rc.d/ntpdate4
1 files changed, 2 insertions, 2 deletions
diff --git a/etc/rc.d/ntpdate b/etc/rc.d/ntpdate
index b2f4055e3427..1ef9b614755f 100755
--- a/etc/rc.d/ntpdate
+++ b/etc/rc.d/ntpdate
@@ -17,13 +17,13 @@ start_cmd="ntpdate_start"
ntpdate_start()
{
- if [ -z "$ntpdate_hosts" ]; then
+ if [ -z "$ntpdate_hosts" -a -f /etc/ntp.conf ]; then
ntpdate_hosts=`awk '
/^server[ \t]*127.127/ {next}
/^(server|peer)/ {print $2}
' </etc/ntp.conf`
fi
- if [ -n "$ntpdate_hosts" ]; then
+ if [ -n "$ntpdate_hosts" -o -n "$rc_flags" ]; then
echo "Setting date via ntp."
${ntpdate_command:-ntpdate} $rc_flags $ntpdate_hosts
fi