We've been reviewing the entire Ubuntu delta for ntp, and came across this sed rule change which is still active. I will drop it for Xenial.
I agree with Jeffrey. The sed rule is incorrect - it does not achieve what it attempts to achieve, and creates surprising behaviour. Fundamentally we have two things at odds with each other. There are two sources for NTP servers: 1) ntp.conf; and 2) any DHCP response. Clearly there are use cases where the DHCP response should be used over an ntp.conf default, and there are also use cases where the DHCP response should be ignored and ntp.conf's default (or changed) settings used instead. The only sane thing to do is to pick a default that will work for the majority of users, and instruct users for whom this does not work on what to do instead. If you have configured your system to use DHCP, I think it is reasonable to expect your system to honor NTP settings received back from DHCP. IMHO, this should by default overrule any setting in ntp.conf, and so Debian's current path is sane, and Ubuntu should follow. Therefore I am dropping Ubuntu's delta on this point for Xenial. If you have a special case where you are using DHCP but do not want DHCP's NTP server response to override local settings, then you should configure the DHCP client you are using to ignore any NTP part of the DHCP response to get the behaviour you need. I'd appreciate if someone could comment with exact steps on how to achieve this. I'll mark this bug Won't Fix now, to reflect the fact that the original reporter's actual behaviour is the expected behaviour for Xenial onwards. ** Changed in: ntp (Ubuntu) Status: Fix Released => Won't Fix -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to ntp in Ubuntu. https://bugs.launchpad.net/bugs/575458 Title: /etc/dhcp3/dhclient-exit-hooks.d/ntp breaks local NTP server (patch) Status in ntp package in Ubuntu: Won't Fix Bug description: Binary package hint: ntp The dhcp exit hook for ntp removes *all* ntp servers from ntp.conf if the dhcp server provides a new ntp host. This is generally good, unless your computer *is* an ntp server. In this case, your ntp server won't work the next time your computer starts without DHCP. The following patch fixes the problem by *not* replacing ntp servers with an address beginning with "127.": Patch for /etc/dhcp3/dhclient-exit-hooks.d/ntp: @@ -40,7 +40,7 @@ echo "server $server iburst" done echo - sed -r -e '/^ *(server|peer).*$/d' $NTP_CONF + sed -r -e '/^ *(server *[^1][^2][^7]\.|peer).*$/d' $NTP_CONF ) >>$tmp mv $tmp $NTP_DHCP_CONF $ lsb_release -rd Description: Ubuntu 10.04 LTS Release: 10.04 ProblemType: Bug DistroRelease: Ubuntu 10.04 Package: ntp (not installed) ProcVersionSignature: Ubuntu 2.6.32-21.32-generic 2.6.32.11+drm33.2 Uname: Linux 2.6.32-21-generic x86_64 NonfreeKernelModules: nvidia Architecture: amd64 Date: Tue May 4 17:06:40 2010 InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release amd64 (20091027) ProcEnviron: PATH=(custom, user) LANG=en_US.utf8 SHELL=/bin/bash SourcePackage: ntp To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/ntp/+bug/575458/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp