Make the ntp.conf parsing more specific, and therefore more robust. Closes

PR bin/23305.
This commit is contained in:
fredb 2003-10-29 19:00:14 +00:00
parent 812a254c5d
commit 8098923219
1 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
#!/bin/sh
#
# $NetBSD: ntpdate,v 1.13 2003/10/20 16:09:15 fredb Exp $
# $NetBSD: ntpdate,v 1.14 2003/10/29 19:00:14 fredb Exp $
#
# PROVIDE: ntpdate
@ -20,7 +20,7 @@ ntpdate_start()
ntpdate_hosts=`awk '
/^#/ { next }
/^(server|peer)[ \t]*127.127/ { next }
/^(server|peer)/ { if ($2 ~ /[-]/)
/^(server|peer)/ { if ($2 ~ /^-[46]/)
print $3
else
print $2 }