Bug 207095

Summary: [patch] new /etc/rc.d/ntpd script exits before updating leapsecond file on non chrooted setups
Product: Base System Reporter: Guido Falsi <madpilot>
Component: confAssignee: Cy Schubert <cy>
Status: Closed FIXED    
Severity: Affects Some People CC: bdrewery, cy
Priority: --- Keywords: patch
Version: CURRENTFlags: madpilot: mfc-stable10?
Hardware: Any   
OS: Any   
Attachments:
Description Flags
simple patch none

Description Guido Falsi freebsd_committer freebsd_triage 2016-02-11 00:56:17 UTC
Created attachment 166862 [details]
simple patch

The recent update to the ntpd rc script contains an error imho:

The check for chrooted environment, which causes the precmd to return immediately if it does not detect a chrooted environment was erroneously put before the check for the existence of the working copy of the leap seconds file.

This causes the working copy of the leap seconds file to not be created on startup, ensuing a warning from ntpd.

Attached patch is a simple fix I have tested.

Also note that this version (containing the mistake) of the ntpd startup script was merge to stable/10, so this fix should be merged there too ASAP, before 10.3 release.

Thanks in advance.
Comment 1 commit-hook freebsd_committer freebsd_triage 2016-02-11 01:17:22 UTC
A commit references this bug:

Author: cy
Date: Thu Feb 11 01:16:57 UTC 2016
New revision: 295495
URL: https://svnweb.freebsd.org/changeset/base/295495

Log:
  Update leapsecond file in non-chroot environments.

  PR:		207095
  Submitted by:	madpilot
  MFC after:	3 days

Changes:
  head/etc/rc.d/ntpd
Comment 2 Bryan Drewery freebsd_committer freebsd_triage 2016-02-11 01:37:39 UTC
Thanks!
Comment 3 commit-hook freebsd_committer freebsd_triage 2016-02-14 23:05:22 UTC
A commit references this bug:

Author: cy
Date: Sun Feb 14 23:04:53 UTC 2016
New revision: 295619
URL: https://svnweb.freebsd.org/changeset/base/295619

Log:
  MFC r295495 - Update leapsecond file in non-chroot environments.

  PR:		207095
  Submitted by:	madpilot
  Approved by:	re (marius)

Changes:
_U  stable/10/
  stable/10/etc/rc.d/ntpd
Comment 4 commit-hook freebsd_committer freebsd_triage 2016-02-14 23:06:23 UTC
A commit references this bug:

Author: cy
Date: Sun Feb 14 23:05:45 UTC 2016
New revision: 295620
URL: https://svnweb.freebsd.org/changeset/base/295620

Log:
  MFC r295495 - Update leapsecond file in non-chroot environments.

  PR:		207095
  Submitted by:	madpilot

Changes:
_U  stable/9/
_U  stable/9/etc/
_U  stable/9/etc/rc.d/
  stable/9/etc/rc.d/ntpd