Package: ntp
Version: 1:4.2.6p6+dfsg-2
Tags: patch

Hello,

ntp currently installs a script as
/etc/dhcp3/dhclient-exit-hooks.d/ntp This script takes an
existing /etc/ntp.conf and replaces all peer or server statements
in it by those given via dhcp. All configured local clocks are
overwritten, leading to undesried behaviour.

IMHO it should preserve configured local clocks, i.e. server
statements starting with 127 as the peer address.

The attached patch is a short hack that implements this.

IMHO a more sophisticated script is needed that maybe preserves
all servers with corresponding fudge lines (local clocks) and
adds restrict line allowing time exchange with the ntp peers
received by dhcp.

Bye,

Joerg


--- /tmp/ntp    2009-08-17 18:42:14.543903299 +0200
+++ ntp 2009-08-17 18:43:37.964343565 +0200
@@ -40,7 +40,7 @@
                echo "server $server iburst"
          done
          echo
-         sed -r -e '/^ *(server|peer).*$/d' $NTP_CONF
+         sed -r -e '/^ *(server|peer) +([^1]|[^1][^2]|[^1][^2][^7]).*$/d' 
$NTP_CONF
        ) >>$tmp
        
        mv $tmp $NTP_DHCP_CONF

Attachment: signature.asc
Description: Digital signature

Reply via email to