Make the ntp.conf parsing more specific, and therefore more robust. Closes
PR bin/23305.
This commit is contained in:
parent
812a254c5d
commit
8098923219
|
@ -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 }
|
||||
|
|
Loading…
Reference in New Issue