mirror of
https://github.com/troglobit/finit.git
synced 2026-10-02 05:52:48 +07:00
cgroup: Call ifupdown in system cgroup
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
@@ -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
@@ -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
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user