Package: release.debian.org
Severity: normal
Tags: trixie
X-Debbugs-Cc: [email protected]
Control: affects -1 + src:chrony
User: [email protected]
Usertags: pu

Hi,

[ Reason ]
The if-up hook script can fail on rare occasions which cause networking.service
to exit with status 1. Those failures happen when run-parts(8) starts
when chronyd is still initializing.

[ Impact ]
Occasional networking.service failures.

[ Tests ]
I manually check that the aforementioned issue could not be reproduced by
performing continuous reboots.

[ Risks ]
As you can see, the proposed changes are rather trivial.

[ Checklist ]
  [x] *all* changes are documented in the d/changelog
  [x] I reviewed all changes and I approve them
  [x] attach debdiff against the package in (old)stable
  [x] the issue is verified as fixed in unstable

[ Changes ]
Drop 'set -e' to prevent the if-up hook script to exit 1 if
`chronyc onoffline` fails.
Also check for the chronyd.sock Unix domain command socket instead of
chronyd.pid since the latter does not guarantee that that command socket
is available.

[ Other info ]
To be on the safe side, I also modified the if-down hook script to match
the if-up one.

Cheers,
Vincent
diff -Nru chrony-4.6.1/debian/changelog chrony-4.6.1/debian/changelog
--- chrony-4.6.1/debian/changelog       2026-02-16 17:34:12.000000000 +0100
+++ chrony-4.6.1/debian/changelog       2026-06-24 20:05:59.000000000 +0200
@@ -1,3 +1,11 @@
+chrony (4.6.1-3+deb13u2) trixie; urgency=medium
+
+  * debian/chrony.if-{post-down,up}:
+    - Adjust the if-up and if-down hook scripts so that they always exit
+    successfully. (Closes: #1011533)
+
+ -- Vincent Blut <[email protected]>  Wed, 24 Jun 2026 20:05:59 +0200
+
 chrony (4.6.1-3+deb13u1) trixie; urgency=medium
 
   * debian/patches/:
diff -Nru chrony-4.6.1/debian/chrony.if-post-down 
chrony-4.6.1/debian/chrony.if-post-down
--- chrony-4.6.1/debian/chrony.if-post-down     2026-02-16 17:34:12.000000000 
+0100
+++ chrony-4.6.1/debian/chrony.if-post-down     2026-06-24 20:05:59.000000000 
+0200
@@ -1,10 +1,8 @@
 #!/bin/sh
 
-set -e
-
 [ -x /usr/sbin/chronyd ] || exit 0
 
-if [ -e /run/chrony/chronyd.pid ]; then
+if [ -S /run/chrony/chronyd.sock ]; then
     chronyc onoffline > /dev/null 2>&1
 fi
 
diff -Nru chrony-4.6.1/debian/chrony.if-up chrony-4.6.1/debian/chrony.if-up
--- chrony-4.6.1/debian/chrony.if-up    2026-02-16 17:34:12.000000000 +0100
+++ chrony-4.6.1/debian/chrony.if-up    2026-06-24 20:05:59.000000000 +0200
@@ -1,10 +1,8 @@
 #!/bin/sh
 
-set -e
-
 [ -x /usr/sbin/chronyd ] || exit 0
 
-if [ -e /run/chrony/chronyd.pid ]; then
+if [ -S /run/chrony/chronyd.sock ]; then
     chronyc onoffline > /dev/null 2>&1
 fi
 

Attachment: signature.asc
Description: PGP signature

Reply via email to