I've just been bitten by this on stretch.  So I dutifully looked up the
current bug list before submitting a new one, and there was one there -
 6 years old!

So then I thought "maybe a patch would help", but lo and behold someone
already had.  Then I noticed it was me - when I got bitten by the very
same thing 4 years ago!

/var/run has moved to /run in the mean time so I've attached a
refreshed version of the patch.

Would it be possible to apply it in time for stretch?  Or if you are
too busy, would an NMU be appropriate?
diff -Nur ntp-4.2.8p8+dfsg.orig/debian/apparmor-profile ntp-4.2.8p8+dfsg/debian/apparmor-profile
--- ntp-4.2.8p8+dfsg.orig/debian/apparmor-profile	2016-10-09 03:32:52.000000000 +1000
+++ ntp-4.2.8p8+dfsg/debian/apparmor-profile	2016-11-21 16:28:12.592851918 +1000
@@ -45,7 +45,7 @@
   /etc/ntp.conf.dhcp r,
   /etc/ntpd.conf r,
   /etc/ntpd.conf.tmp r,
-  /var/lib/ntp/ntp.conf.dhcp r,
+  /run/ntp.conf.dhcp r,
 
   /etc/ntp.keys r,
   /etc/ntp/** r,
diff -Nur ntp-4.2.8p8+dfsg.orig/debian/ntpdate-debian ntp-4.2.8p8+dfsg/debian/ntpdate-debian
--- ntp-4.2.8p8+dfsg.orig/debian/ntpdate-debian	2016-10-09 03:32:52.000000000 +1000
+++ ntp-4.2.8p8+dfsg/debian/ntpdate-debian	2016-11-21 16:28:24.000983662 +1000
@@ -7,7 +7,7 @@
 fi
 
 if [ "$NTPDATE_USE_NTP_CONF" = yes ]; then
-	for f in /var/lib/ntp/ntp.conf.dhcp /etc/ntp.conf /etc/openntpd/ntpd.conf; do
+	for f in /run/ntp.conf.dhcp /etc/ntp.conf /etc/openntpd/ntpd.conf; do
 		if [ -r "$f" ]; then
 			file=$f
 			break
diff -Nur ntp-4.2.8p8+dfsg.orig/debian/ntp.dhcp ntp-4.2.8p8+dfsg/debian/ntp.dhcp
--- ntp-4.2.8p8+dfsg.orig/debian/ntp.dhcp	2016-10-09 03:32:52.000000000 +1000
+++ ntp-4.2.8p8+dfsg/debian/ntp.dhcp	2016-11-21 16:28:28.497035584 +1000
@@ -1,5 +1,5 @@
 NTP_CONF=/etc/ntp.conf
-NTP_DHCP_CONF=/var/lib/ntp/ntp.conf.dhcp
+NTP_DHCP_CONF=/run/ntp.conf.dhcp
 
 
 ntp_server_restart() {
diff -Nur ntp-4.2.8p8+dfsg.orig/debian/ntp.init ntp-4.2.8p8+dfsg/debian/ntp.init
--- ntp-4.2.8p8+dfsg.orig/debian/ntp.init	2016-10-09 03:32:52.000000000 +1000
+++ ntp-4.2.8p8+dfsg/debian/ntp.init	2016-11-21 16:28:05.380768632 +1000
@@ -22,8 +22,8 @@
 	. /etc/default/ntp
 fi
 
-if [ -e /var/lib/ntp/ntp.conf.dhcp ]; then
-	NTPD_OPTS="$NTPD_OPTS -c /var/lib/ntp/ntp.conf.dhcp"
+if [ -e /run/ntp.conf.dhcp ]; then
+	NTPD_OPTS="$NTPD_OPTS -c /run/ntp.conf.dhcp"
 fi
 
 
diff -Nur ntp-4.2.8p8+dfsg.orig/debian/README.Debian ntp-4.2.8p8+dfsg/debian/README.Debian
--- ntp-4.2.8p8+dfsg.orig/debian/README.Debian	2016-10-09 03:32:52.000000000 +1000
+++ ntp-4.2.8p8+dfsg/debian/README.Debian	2016-11-21 16:28:17.300906289 +1000
@@ -28,7 +28,7 @@
 If DHCP is used to configure the host, and the DHCP server sends
 information about NTP servers, then this information will be used
 automatically.  This is done by making a copy of /etc/ntp.conf at
-/var/lib/ntp/ntp.conf.dhcp, replacing the server entries with the
+/run/ntp.conf.dhcp, replacing the server entries with the
 information provided by the DHCP server, and restarting the NTP
 server.
 

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to