From fd66dc60a0d653b8305b9e24645d6f1fb9d95a21 Mon Sep 17 00:00:00 2001 From: Mike Yuan Date: Wed, 30 Apr 2025 21:23:19 +0200 Subject: [PATCH] units: enable RemoveOnStop= for oomd and userdbd sockets 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 | 1 + units/systemd-userdbd.socket | 1 + 2 files changed, 2 insertions(+) diff --git a/units/systemd-oomd.socket b/units/systemd-oomd.socket index 0002a95bab0..4e24342f581 100644 --- a/units/systemd-oomd.socket +++ b/units/systemd-oomd.socket @@ -21,6 +21,7 @@ ConditionPathExists=/proc/pressure/memory [Socket] ListenStream=/run/systemd/oom/io.systemd.ManagedOOM SocketMode=0666 +RemoveOnStop=yes [Install] WantedBy=sockets.target diff --git a/units/systemd-userdbd.socket b/units/systemd-userdbd.socket index 768253a2b04..6ef1adeca74 100644 --- a/units/systemd-userdbd.socket +++ b/units/systemd-userdbd.socket @@ -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 -- 2.47.3