>>> Tomasz Torcz <to...@pipebreaker.pl> schrieb am 29.07.2022 um 11:01 in
Nachricht
<yuohzq6ib6xyt...@mother.pipebreaker.pl>:
> On Fri, Jul 29, 2022 at 08:45:51AM +0200, Ulrich Windl wrote:
>> Hi!
>> 
>> I wonder: What is the recommended way to do this with systemd?:
>> ---
>> Add the following command to a script executed on system boot, such as 
> /etc/init.d/boot.local:
>> 
>> # echo 0 > /sys/kernel/mm/ksm/run
>> ---
>> Do I have to write a unit for it, or is there some generic mechanism 
> already?
> 
>   You can use tmpfiles. In the manpage
> (https://www.freedesktop.org/software/systemd/man/tmpfiles.d.html)
> there's a following example, which you can adapt:
> 
> # Modify sysfs but don't fail if we are in a container with a read-only 
> /proc
> w- /proc/sys/vm/swappiness - - - - 10

Great, thanks!

> 
> 
> -- 
> Tomasz Torcz           “(…) today's high-end is tomorrow's embedded 
> processor.”
> to...@pipebreaker.pl                      — Mitchell Blank on LKML



Reply via email to