Hi, it's been a long time but I'm currently cleaning up ntp bugs. Actually there has been a fix for while isnce 2010, but later it broke and in Xenial it got finally removed.
Please follow the argument at bug 575458 Copied here as reference: 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. As the other bug I will set this to Won't Fix to reflect that ** Changed in: ntp (Ubuntu) Status: Triaged => 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/374896 Title: Servers specified in ntp.conf are not carried into ntp.conf.dhcp Status in ntp package in Ubuntu: Won't Fix Bug description: Binary package hint: ntp By default, ntpd starts up reading /etc/ntp.conf.dhcp; if that file does not exist, /etc/ntp.conf is read instead. According to ntp.conf.dhcp, the file is generated based on ntp.conf after any DHCP event occurs. The problem is that, according to the man page, you may specify servers in ntp.conf, but the DHCP hook to generate ntp.conf.dhcp specifically filters out any servers/peers that you specify in ntp.conf. Here is a patch for /etc/dhcp3/dhclient-exit- hooks.d/ntp to fix the problem: === Beginning of patch === *** ntp.old 2009-05-11 09:40:11.000000000 -0400 --- ntp 2009-05-11 09:40:23.000000000 -0400 *************** *** 40,46 **** echo "server $server iburst" done echo ! sed -r -e '/^ *(server|peer).*$/d' $NTP_CONF ) >>$tmp mv $tmp $NTP_DHCP_CONF --- 40,46 ---- echo "server $server iburst" done echo ! cat $NTP_CONF ) >>$tmp mv $tmp $NTP_DHCP_CONF === End of patch === Ubuntu release: 9.04 Package version: 1:4.2.4p4+dfsg-7ubuntu5 Expected behavior: When a DHCP event happens, ntp.conf.dhcp is regenerated including any servers specified in ntp.conf Actual behavior: When a DHCP event happens, ntp.conf.dhcp is regenerated using only the servers found in the DHCP data, filtering out all server/peer lines from ntp.conf ProblemType: Bug Architecture: i386 DistroRelease: Ubuntu 9.04 Package: ntp 1:4.2.4p4+dfsg-7ubuntu5 ProcEnviron: SHELL=/bin/bash PATH=(custom, user) LANG=en_US.UTF-8 LANGUAGE= SourcePackage: ntp Uname: Linux 2.6.28-11-generic i686 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/ntp/+bug/374896/+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