]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
unit: add conditions and deps to make oomd.socket and .service consistent
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 18 May 2023 19:47:34 +0000 (04:47 +0900)
committerFrantisek Sumsal <frantisek@sumsal.cz>
Fri, 19 May 2023 06:58:56 +0000 (08:58 +0200)
Fixes #27690.

units/systemd-oomd.socket

index 47cd0e755589016b5449a89d6dbb959f08350c17..70eb6b7bc3c4d133b1928be224e2b67e04d5dd13 100644 (file)
 Description=Userspace Out-Of-Memory (OOM) Killer Socket
 Documentation=man:systemd-oomd.service(8)
 DefaultDependencies=no
-Before=sockets.target
+Before=sockets.target shutdown.target
+Conflicts=shutdown.target
+ConditionControlGroupController=v2
+ConditionControlGroupController=memory
+ConditionPathExists=/proc/pressure/cpu
+ConditionPathExists=/proc/pressure/io
+ConditionPathExists=/proc/pressure/memory
 
 [Socket]
 ListenStream=/run/systemd/oom/io.system.ManagedOOM