]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
units: enable RemoveOnStop= for oomd and userdbd sockets 37309/head
authorMike Yuan <me@yhndnzj.com>
Wed, 30 Apr 2025 19:23:19 +0000 (21:23 +0200)
committerMike Yuan <me@yhndnzj.com>
Wed, 30 Apr 2025 19:30:53 +0000 (21:30 +0200)
We usually don't care, but here the existence of socket
is public API to a certain degree and signals availability
of the service (userdbd in particular, oomd is checked in
core-varlink.c). Hence let's be more careful and remove them
if stopped.

units/systemd-oomd.socket
units/systemd-userdbd.socket

index 0002a95bab05c957d0a69cd54138083941a1103e..4e24342f5815fba9eec04275f806862f8512fc2c 100644 (file)
@@ -21,6 +21,7 @@ ConditionPathExists=/proc/pressure/memory
 [Socket]
 ListenStream=/run/systemd/oom/io.systemd.ManagedOOM
 SocketMode=0666
+RemoveOnStop=yes
 
 [Install]
 WantedBy=sockets.target
index 768253a2b046b7f884a4191f487f3a0d70dda5af..6ef1adeca74b22a132d2a95bd6922559520d6d2a 100644 (file)
@@ -17,6 +17,7 @@ Before=sockets.target
 ListenStream=/run/systemd/userdb/io.systemd.Multiplexer
 Symlinks=/run/systemd/userdb/io.systemd.NameServiceSwitch /run/systemd/userdb/io.systemd.DropIn
 SocketMode=0666
+RemoveOnStop=yes
 
 [Install]
 WantedBy=sockets.target