Thank you Alexander for submitting this patch, and to Christian for
catching up on old bugs. I'm reviewing Christian's merge proposal at
https://code.launchpad.net/~paelzer/ubuntu/+source/ntp/+git/ntp/+merge/299122
which includes this patch but thought it would be more inclusive to
discuss it directly in this bug.

There is a risk in introducing a new configuration variable in a delta
in Ubuntu. If Debian don't adopt exactly the same thing, it means that
we have to maintain a delta indefinitely in Ubuntu, since to then sync
with Debian would mean breaking users on upgrade. In this case,
Alexander will set the new NTPD_CONF variable and after a sync,
Alexander will upgrade to a version where this silently stops working.
Christian said "I'm not sure if this is worth a delta" and for this
reason I agree.

Instead, I propose that it doesn't make sense for the system to be
configured to request NTP configuration via DHCP and then not use it. So
I think a more appropriate solution is to expect users who want to
override ntp.conf to also disable NTP-by-DHCP in dhclient's
configuration. Then /var/lib/ntp/ntp.conf.dhcp would not exist and this
problem wouldn't arise. dhclient packaging should also ensure that the
file is deleted when it is no longer relevant. If this is not currently
possible, I think a fix should be in dhclient's package to make this
easier, rather than in ntp to ignore the supplied configuration.

Alexander said "On that box, ntpd exited with an error because it had
received two config files in its arguments. Not good." and I agree. Note
though that with Alexander's patch, this can still happen - the patch
just provides a workaround at configuration level. My proposal doesn't
solve this problem either, I admit; my alternative workaround is to
adjust dhclient.

So I'm proposing a "Won't Fix" for ntp in Ubuntu, and to add a task for
dhclient if necessary. We can of course take whatever Debian want to do,
since then we don't incur a maintenance burden. If Debian wants to add
$NTPD_CONF, I have no objection. So thank you Christian for filing this
in Debian. But I don't think we should add it in a delta in Ubuntu
because of the pain of the divergence from Debian in this case.

-- 
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/1129696

Title:
  Cannot set config file in /etc/default/ntp

Status in NTP:
  New
Status in ntp package in Ubuntu:
  Triaged

Bug description:
  Description:    Ubuntu 12.04 LTS
  Release:        12.04

  ntp:
    Installed: 1:4.2.6.p3+dfsg-1ubuntu3.1
    Candidate: 1:4.2.6.p3+dfsg-1ubuntu3.1
    Version table:
   *** 1:4.2.6.p3+dfsg-1ubuntu3.1 0
          500 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main amd64 
Packages
          100 /var/lib/dpkg/status
       1:4.2.6.p3+dfsg-1ubuntu3 0
          500 http://us.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
  f
  I had a need to set a custom config file for ntp. I looked about and found 
that I could pass a '-c' option and that options for ntp are set in 
/etc/default/ntp in NTPD_OPTS. So I put it in there: NTPD_OPTS='-g -c 
/path/to/custom/ntp.conf'. It worked. Until I deployed to another box that was 
receiving NTP settings via DHCP. On that box, ntpd exited with an error because 
it had received two config files in its arguments. Not good.

  After reading through the init script, I opted to add a new variable
  to /etc/default/ntp specifically for holding a custom config file.
  Attached is a patch that will use that value if DHCP has not created
  its own ntp.conf. If NTP settings were passed via DCHP, then those
  settings will override the custom config file.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ntp/+bug/1129696/+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

Reply via email to