[OpenWrt-Devel] [PATCH] [procd] initd: mount cgroup

Luka Perkov luka at openwrt.org
Tue Nov 11 08:28:19 EST 2014


If kernel is compiled with cgroup support it should be mounted. This change
does not effect kernels without cgroup support.

Signed-off-by: Luka Perkov <luka at openwrt.org>
---

I'd prefer to put this here rather then having init script which does the same.

 initd/early.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/initd/early.c b/initd/early.c
index a9f6afb..c622aec 100644
--- a/initd/early.c
+++ b/initd/early.c
@@ -29,6 +29,7 @@ early_mounts(void)
 {
 	mount("proc", "/proc", "proc", MS_NOATIME, 0);
 	mount("sysfs", "/sys", "sysfs", MS_NOATIME, 0);
+	mount("none", "/sys/fs/cgroup", "cgroup", 0, 0);
 
 	mount("tmpfs", "/tmp", "tmpfs", MS_NOSUID | MS_NODEV | MS_NOATIME, NULL);
 	mkdir("/tmp/run", 0777);
-- 
2.1.3
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list