diff --git a/cmd/control/console_init.go b/cmd/control/console_init.go index 5d5b0990..449d1d51 100644 --- a/cmd/control/console_init.go +++ b/cmd/control/console_init.go @@ -11,6 +11,8 @@ import ( "strings" "syscall" + "golang.org/x/sys/unix" + "github.com/codegangsta/cli" "github.com/rancher/os/cmd/cloudinitexecute" "github.com/rancher/os/compose" @@ -130,6 +132,14 @@ func consoleInitFunc() error { } } + // mount systemd cgroups + if err := os.MkdirAll("/sys/fs/cgroup/systemd", 0555); err != nil { + log.Error(err) + } + if err := unix.Mount("cgroup", "/sys/fs/cgroup/systemd", "cgroup", 0, "none,name=systemd"); err != nil { + log.Error(err) + } + // font backslashes need to be escaped for when issue is output! (but not the others..) if err := ioutil.WriteFile("/etc/issue", []byte(config.Banner), 0644); err != nil { log.Error(err)