cgroup: Call ifupdown in system cgroup

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg
2021-04-09 18:21:04 +02:00
parent 3b5cfc5ecf
commit 61781c72fe
3 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -254,8 +254,8 @@ in which services and user sessions are placed in:
|-- system/ # cpu.weight:9800
`-- user/ # cpu.weight:100
Finit itself, helper services like `ifup -a`, and the like are placed
in the leaf-node group `init/`, which also is _reserved_.
Finit itself and its helper scripts and services are placed in the
top-level leaf-node group `init/`, which also is _reserved_.
All run/task/service/sysv processes are placed in their own sub-group
in `system/`. The name of each sub-group is taken from the respective
+2 -3
View File
@@ -160,9 +160,8 @@ the above three. We leave `init/` and `user /` as-is reducing weight of
cgroup maint cpu.weight:100
By default, the `system/` cgroup is selected for almost everything. The
`init/` cgroup is reserved for PID 1 itself and its closest relatives,
e.g., children of `ifup -a`. The `user/` cgroup is for local TTY logins
spawned by getty.
`init/` cgroup is reserved for PID 1 itself and its closest relatives.
The `user/` cgroup is for local TTY logins spawned by getty.
To select a different top-level cgroup, e.g. `maint/`, one can either
define it for a group of run/task/service directives in a `.conf` or per
+1
View File
@@ -537,6 +537,7 @@ void networking(int updown)
run("ifdown -a");
_exit(0);
}
cgroup_service("network", pid, NULL);
print(pid > 0 ? 0 : 1, "%s networking", updown ? "Starting" : "Stopping");
}