diff options
author | Hajimu UMEMOTO <ume@FreeBSD.org> | 2010-01-30 16:34:52 +0000 |
---|---|---|
committer | Hajimu UMEMOTO <ume@FreeBSD.org> | 2010-01-30 16:34:52 +0000 |
commit | 98255d746a117b25b39034f3807a12e490728698 (patch) | |
tree | 6770e943934c758519f25dad11a34420a0abde0c /etc/rc.d/ntpdate | |
parent | 6d709b9a44a2510e6e0d38087a7bb1cf44aeaeb3 (diff) | |
download | src-98255d746a117b25b39034f3807a12e490728698.tar.gz src-98255d746a117b25b39034f3807a12e490728698.zip |
Allow use of -6 option to "server" and "peer" in ntp.conf.
MFC after: 1 week
Notes
Notes:
svn path=/head/; revision=203200
Diffstat (limited to 'etc/rc.d/ntpdate')
-rwxr-xr-x | etc/rc.d/ntpdate | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/etc/rc.d/ntpdate b/etc/rc.d/ntpdate index c76f7a0e7f54..3f93e2718072 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 |