[systemd-devel] [PATCH] units/systemd-sysctl.service.in: run after load-modules

Lennart Poettering lennart at poettering.net
Fri Mar 22 20:50:26 PDT 2013

On Sat, 23.03.13 03:54, Cristian Rodríguez (crrodriguez at opensuse.org) wrote:

> Modules might or will register new sysctl options.

Well, most modules are loaded asynchronously from udev, so I fear this
won't do much...

/etc/sysctl.d/ is really only for sysctl settings that exist all the
time, and -- as a special exception -- for network-device related
settings, which we set via a udev rule.

If people want to apply sysctls based on specific modules that are
loaded, or based on specific hw that shows up (i.e. hw that isn't a
network device) the only sane way is probably via a udev rule...

> diff --git a/units/systemd-sysctl.service.in b/units/systemd-sysctl.service.in
> index d914553..bf47097 100644
> --- a/units/systemd-sysctl.service.in
> +++ b/units/systemd-sysctl.service.in
> @@ -10,6 +10,7 @@ Description=Apply Kernel Variables
>  Documentation=man:systemd-sysctl.service(8) man:sysctl.d(5)
>  DefaultDependencies=no
>  After=systemd-readahead-collect.service systemd-readahead-replay.service
> +After=systemd-modules-load.service
>  Before=sysinit.target shutdown.target
>  ConditionPathIsReadWrite=/proc/sys/
>  ConditionPathExists=|/etc/sysctl.conf


Lennart Poettering - Red Hat, Inc.

More information about the systemd-devel mailing list