sysctl: run sysctl service if /proc/sys/net is writable (#4425)

This simply changes this line:

    ConditionPathIsReadWrite=/proc/sys/

to this:

     ConditionPathIsReadWrite=/proc/sys/net/

The background for this is that the latter is namespaced through network
namespacing usually and hence frequently set as writable in containers, even
though the former is kept read-only. If /proc/sys is read-only but
/proc/sys/net is writable we should run the sysctl service, as useful settings
may be made in this case.

Fixes: #4370
This commit is contained in:
Lennart Poettering 2016-10-20 19:36:28 +02:00 committed by GitHub
parent 2fa4f10835
commit 411e869f49
1 changed files with 1 additions and 1 deletions

View File

@ -12,7 +12,7 @@ DefaultDependencies=no
Conflicts=shutdown.target
After=systemd-modules-load.service
Before=sysinit.target shutdown.target
ConditionPathIsReadWrite=/proc/sys/
ConditionPathIsReadWrite=/proc/sys/net/
[Service]
Type=oneshot