[pkg-ntp-maintainers] Bug#391131: ntpdate should check for ntp.conf
in /etc/default/ntpdate
terran at consistent.org
terran at consistent.org
Thu Oct 5 05:16:54 UTC 2006
Package: ntpdate
Version: 4.2.2+dfsg.2-2
Severity: Minor
Getting the ntp servers from /etc/ntp.conf is a great idea, and does
save putting them in t2o places. However, it is possible that ntpd is
NOT installed, and therefore there is no /etc/ntp.conf. To avoid
generating file not found errors in this case, I suggest a check for
the existence of the file, as so:
if [ -e /etc/ntp.conf ]
then
NTPSERVERS=$(sed -rne 's/^(server|peer) ([-_.[:alnum:]]+).*$/\2/p' /etc/ntp.
conf | grep -v '^127\.127\.' 2>/dev/null)
fi
More information about the pkg-ntp-maintainers
mailing list