mirror of
https://github.com/systemd/systemd.git
synced 2024-11-28 04:33:36 +08:00
411e869f49
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
22 lines
657 B
SYSTEMD
22 lines
657 B
SYSTEMD
# This file is part of systemd.
|
|
#
|
|
# systemd is free software; you can redistribute it and/or modify it
|
|
# under the terms of the GNU Lesser General Public License as published by
|
|
# the Free Software Foundation; either version 2.1 of the License, or
|
|
# (at your option) any later version.
|
|
|
|
[Unit]
|
|
Description=Apply Kernel Variables
|
|
Documentation=man:systemd-sysctl.service(8) man:sysctl.d(5)
|
|
DefaultDependencies=no
|
|
Conflicts=shutdown.target
|
|
After=systemd-modules-load.service
|
|
Before=sysinit.target shutdown.target
|
|
ConditionPathIsReadWrite=/proc/sys/net/
|
|
|
|
[Service]
|
|
Type=oneshot
|
|
RemainAfterExit=yes
|
|
ExecStart=@rootlibexecdir@/systemd-sysctl
|
|
TimeoutSec=90s
|