Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 12326 - ntp-4.1.1b-r1 has wrong regex in /etc/init.d/ntpd for ntpdateservers
Summary: ntp-4.1.1b-r1 has wrong regex in /etc/init.d/ntpd for ntpdateservers
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-12-17 13:13 UTC by hinman
Modified: 2003-02-04 19:42 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description hinman 2002-12-17 13:13:18 UTC
/etc/init.d/ntp has 
NTPDATESERVERS=`grep '^[server|peer][[:space:]]*' /etc/ntp.conf | awk '{print $2}'`

This regex isn't as precise as it needs to be, it will match a line like this:

restrict default ignore kod

A better regex would be:

NTPDATESERVERS=`grep '^server\b\|^peer\b' /etc/ntp.conf | awk '{print $2}'`
Comment 1 SpanKY gentoo-dev 2002-12-17 17:40:22 UTC
or change grep to egrep ;)