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

2015-11-29 Thread Christoph Anton Mitterer
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.



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

2015-11-29 Thread Christoph Anton Mitterer
On Sun, 2015-11-29 at 23:41 +0100, Kurt Roeckx wrote:
> Yes, I think pool should be treated just like server and peer.
Then obviously
sed '/^[[:space:]]*\(server\|peer\|pool\)[[:space:]]/d' $NTP_CONF

Cheers,
Chris.

smime.p7s
Description: S/MIME cryptographic signature


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

2015-11-29 Thread Kurt Roeckx
On Sun, Nov 29, 2015 at 11:26:00PM +0100, Christoph Anton Mitterer wrote:
> 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?

Yes, I think pool should be treated just like server and peer.


Kurt