[pkg-ntp-maintainers] Bug#806676: ntp: /etc/dhcp/dhclient-exit-hooks.d/ntp incorrectly parses /etc/ntp.conf

Christoph Anton Mitterer calestyo at scientia.net
Sun Nov 29 22:26:00 UTC 2015


Package: ntp
Version: 1:4.2.8p4+dfsg-3+b1
Severity: normal


Hi.

/etc/dhcp/dhclient-exit-hooks.d/ntp parses /etc/ntp.conf and tries to
remove any server and peer stanzas.

- It fails however to remove any such, that have been indented by e.g.
tabs.
- Further, it would remove any other stanzas staring with "server" or
  "peer" should any such be ever supported by ntp

Please replace:
sed -r -e '/^ *(server|peer).*$/d' $NTP_CONF
with
sed '/^[[:space:]]*\(server\|peer\)[[:space:]]/d' $NTP_CONF


Also, it doesn't remove any pool stanzas... not sure if
this should be done or not?
Any ideas?


Cheers,
Chris.



More information about the pkg-ntp-maintainers mailing list