mirror of
https://github.com/troglobit/finit.git
synced 2026-11-15 19:13:11 +00:00
cgroup: Call ifupdown in system cgroup
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
1 parent
3b5cfc5ecf
commit
61781c72fe
3 files changed
+5
-5
No files matched your search
@@ -254,8 +254,8 @@ in which services and user sessions are placed in:
|
|||||||
|-- system/ # cpu.weight:9800
|
|-- system/ # cpu.weight:9800
|
||||||
`-- user/ # cpu.weight:100
|
`-- user/ # cpu.weight:100
|
||||||
|
|
||||||
Finit itself, helper services like `ifup -a`, and the like are placed
|
Finit itself and its helper scripts and services are placed in the
|
||||||
in the leaf-node group `init/`, which also is _reserved_.
|
top-level leaf-node group `init/`, which also is _reserved_.
|
||||||
|
|
||||||
All run/task/service/sysv processes are placed in their own sub-group
|
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
|
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
|
cgroup maint cpu.weight:100
|
||||||
|
|
||||||
By default, the `system/` cgroup is selected for almost everything. The
|
By default, the `system/` cgroup is selected for almost everything. The
|
||||||
`init/` cgroup is reserved for PID 1 itself and its closest relatives,
|
`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
|
The `user/` cgroup is for local TTY logins spawned by getty.
|
||||||
spawned by getty.
|
|
||||||
|
|
||||||
To select a different top-level cgroup, e.g. `maint/`, one can either
|
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
|
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");
|
run("ifdown -a");
|
||||||
_exit(0);
|
_exit(0);
|
||||||
}
|
}
|
||||||
|
cgroup_service("network", pid, NULL);
|
||||||
|
|
||||||
print(pid > 0 ? 0 : 1, "%s networking", updown ? "Starting" : "Stopping");
|
print(pid > 0 ? 0 : 1, "%s networking", updown ? "Starting" : "Stopping");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user