Skip to content

Commit

Permalink
systemd/enable_overcommit_memory: Use /sbin/sysctl for Ubuntu
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
pmenzel committed Aug 2, 2021
1 parent 0f121b7 commit e9c1801
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions misc_systemd_units/enable_overcommit_memory.service
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit e9c1801

Please sign in to comment.