summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorume <ume@FreeBSD.org>2010-01-30 16:34:52 +0000
committerume <ume@FreeBSD.org>2010-01-30 16:34:52 +0000
commit814699570b877693e4d3543391ad94e960181aa5 (patch)
tree6770e943934c758519f25dad11a34420a0abde0c /etc
parentf694a0b000813f3f8b913afa7fa17d33373f0363 (diff)
downloadFreeBSD-src-814699570b877693e4d3543391ad94e960181aa5.zip
FreeBSD-src-814699570b877693e4d3543391ad94e960181aa5.tar.gz
Allow use of -6 option to "server" and "peer" in ntp.conf.
MFC after: 1 week
Diffstat (limited to 'etc')
-rwxr-xr-xetc/rc.d/ntpdate4
1 files changed, 3 insertions, 1 deletions
diff --git a/etc/rc.d/ntpdate b/etc/rc.d/ntpdate
index c76f7a0..3f93e27 100755
--- a/etc/rc.d/ntpdate
+++ b/etc/rc.d/ntpdate
@@ -19,7 +19,9 @@ ntpdate_start()
if [ -z "$ntpdate_hosts" -a -f ${ntpdate_config} ]; then
ntpdate_hosts=`awk '
/^server[ \t]*127.127/ {next}
- /^(server|peer)/ {print $2}
+ /^(server|peer)/ {
+ if ($2 ~/^-/) {print $3}
+ else {print $2}}
' < ${ntpdate_config}`
fi
if [ -n "$ntpdate_hosts" -o -n "$rc_flags" ]; then
OpenPOWER on IntegriCloud