diff --git a/10-oomd-per-slice-defaults.conf b/10-oomd-per-slice-defaults.conf new file mode 100644 index 0000000..fbf6f00 --- /dev/null +++ b/10-oomd-per-slice-defaults.conf @@ -0,0 +1,3 @@ +[Slice] +ManagedOOMMemoryPressure=kill +ManagedOOMMemoryPressureLimit=50% diff --git a/10-oomd-root-slice-defaults.conf b/10-oomd-root-slice-defaults.conf deleted file mode 100644 index 49958e8..0000000 --- a/10-oomd-root-slice-defaults.conf +++ /dev/null @@ -1,2 +0,0 @@ -[Slice] -ManagedOOMSwap=kill diff --git a/10-oomd-user-service-defaults.conf b/10-oomd-user-service-defaults.conf deleted file mode 100644 index 94d5c87..0000000 --- a/10-oomd-user-service-defaults.conf +++ /dev/null @@ -1,3 +0,0 @@ -[Service] -ManagedOOMMemoryPressure=kill -ManagedOOMMemoryPressureLimit=50% diff --git a/systemd.spec b/systemd.spec index 46a8403..2a798a3 100644 --- a/systemd.spec +++ b/systemd.spec @@ -70,8 +70,7 @@ Source12: systemd-user Source13: libsystemd-shared.abignore Source14: 10-oomd-defaults.conf -Source15: 10-oomd-root-slice-defaults.conf -Source16: 10-oomd-user-service-defaults.conf +Source15: 10-oomd-per-slice-defaults.conf Source21: macros.sysusers Source22: sysusers.attr @@ -664,8 +663,9 @@ install -D -t %{buildroot}/usr/lib/systemd/ %{SOURCE3} # systemd-oomd default configuration install -Dm0644 -t %{buildroot}%{_prefix}/lib/systemd/oomd.conf.d/ %{SOURCE14} -install -Dm0644 -t %{buildroot}%{system_unit_dir}/-.slice.d/ %{SOURCE15} -install -Dm0644 -t %{buildroot}%{system_unit_dir}/user@.service.d/ %{SOURCE16} +install -Dm0644 -t %{buildroot}%{system_unit_dir}/user-.slice.d/ %{SOURCE15} +install -Dm0644 -t %{buildroot}%{system_unit_dir}/system.slice.d/ %{SOURCE15} +install -Dm0644 -t %{buildroot}%{user_unit_dir}/slice.d/ %{SOURCE15} sed -i 's|#!/usr/bin/env python3|#!%{__python3}|' %{buildroot}/usr/lib/systemd/tests/run-unit-tests.py