diff options
| author | Hajimu UMEMOTO <ume@FreeBSD.org> | 2010-02-06 15:32:42 +0000 |
|---|---|---|
| committer | Hajimu UMEMOTO <ume@FreeBSD.org> | 2010-02-06 15:32:42 +0000 |
| commit | 1cddf840fbfe55a492e435989dc12d47abcd9275 (patch) | |
| tree | 403104d01eac248d7353a3e6340ec09846420fad /etc | |
| parent | bb07fbe3c1a0af42358a3551f900f5c04af79c52 (diff) | |
Notes
Diffstat (limited to 'etc')
| -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 |
