From e9c18017f511666907bb8155dacc2dc201f323a7 Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Mon, 2 Aug 2021 15:16:22 +0200 Subject: [PATCH] systemd/enable_overcommit_memory: Use `/sbin/sysctl` for Ubuntu MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ubuntu’s package *procps* 2:3.3.16-5ubuntu3.1 installs `sysctl` only in `/sbin/sysctl`, and therefore the service unit fails to be started. Instead of `/usr/sbin/sysctl`, use `/sbin/sysctl`, which is a symbolic link on MarIuX. $ ls -l /sbin/sysctl # usrlinks-1.0-0.x86_64 lrwxrwxrwx 1 root root 16 May 29 15:02 /sbin/sysctl -> /usr/sbin/sysctl Alternatively, as systemd does not require absolute pathnames anymore, only `sysctl` could be used, but be explicit for now. --- misc_systemd_units/enable_overcommit_memory.service | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc_systemd_units/enable_overcommit_memory.service b/misc_systemd_units/enable_overcommit_memory.service index 678c68e..302248f 100644 --- a/misc_systemd_units/enable_overcommit_memory.service +++ b/misc_systemd_units/enable_overcommit_memory.service @@ -8,8 +8,8 @@ ConditionHost=|flughafenberlinbrandenburgwillybrandt.molgen.mpg.de [Service] Type=oneshot RemainAfterExit=yes -ExecStart=/usr/sbin/sysctl vm.overcommit_memory=0 -ExecStop=/usr/sbin/sysctl vm.overcommit_memory=2 +ExecStart=/sbin/sysctl vm.overcommit_memory=0 +ExecStop=/sbin/sysctl vm.overcommit_memory=2 [Install] WantedBy=graphical.target