mirror of
https://github.com/rancher/os.git
synced 2025-07-06 03:26:12 +00:00
Add systemd cgroup directory
This commit is contained in:
parent
5e4f63f02e
commit
f6ebb5002e
@ -11,6 +11,8 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"syscall"
|
"syscall"
|
||||||
|
|
||||||
|
"golang.org/x/sys/unix"
|
||||||
|
|
||||||
"github.com/codegangsta/cli"
|
"github.com/codegangsta/cli"
|
||||||
"github.com/rancher/os/cmd/cloudinitexecute"
|
"github.com/rancher/os/cmd/cloudinitexecute"
|
||||||
"github.com/rancher/os/compose"
|
"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..)
|
// 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 {
|
if err := ioutil.WriteFile("/etc/issue", []byte(config.Banner), 0644); err != nil {
|
||||||
log.Error(err)
|
log.Error(err)
|
||||||
|
Loading…
Reference in New Issue
Block a user