7 # REQUIRE: NETWORKING syslogd
13 desc="Set the date and time via NTP"
14 rcvar="ntpdate_enable"
16 start_cmd="ntpdate_start"
20 if [ -z "$ntpdate_hosts" -a -f "$ntpdate_config" ]; then
22 /^server[ \t]*127.127/ {next}
23 /^(server|peer|pool)/ {
24 if ($2 ~/^-/) {print $3}
26 ' < "$ntpdate_config"`
28 if [ -n "$ntpdate_hosts" -o -n "$rc_flags" ]; then
29 echo "Setting date via ntp."
30 ${ntpdate_program:-ntpdate} $rc_flags $ntpdate_hosts