Package: release.debian.org
Severity: normal
Tags: bookworm
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.

I will send a similar request targetting trixie.

Cheers,
Vincent
diff -Nru chrony-4.3/debian/changelog chrony-4.3/debian/changelog
--- chrony-4.3/debian/changelog 2026-02-17 16:40:15.000000000 +0100
+++ chrony-4.3/debian/changelog 2026-07-02 15:56:53.000000000 +0200
@@ -1,3 +1,11 @@
+chrony (4.3-2+deb12u3) bookworm; 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]>  Thu, 02 Jul 2026 15:56:53 +0200
+
 chrony (4.3-2+deb12u2) bookworm; urgency=medium
 
   * debian/patches/:
diff -Nru chrony-4.3/debian/chrony.if-post-down 
chrony-4.3/debian/chrony.if-post-down
--- chrony-4.3/debian/chrony.if-post-down       2026-02-17 16:40:15.000000000 
+0100
+++ chrony-4.3/debian/chrony.if-post-down       2026-07-02 15:56:53.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.3/debian/chrony.if-up chrony-4.3/debian/chrony.if-up
--- chrony-4.3/debian/chrony.if-up      2026-02-17 16:40:15.000000000 +0100
+++ chrony-4.3/debian/chrony.if-up      2026-07-02 15:56:53.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