On Gentoo, the memory cgroup is mounted at /sys/fs/cgroup/memory, but the mount line looks like the following:
memory on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
(note that the first word on the line is "memory", not "cgroup", but the other essentials are there, namely the type of cgroup and the memory mount option)
| ... | ... |
@@ -442,7 +442,7 @@ func FindCgroupMountpoint(cgroupType string) (string, error) {
|
| 442 | 442 |
return "", err |
| 443 | 443 |
} |
| 444 | 444 |
|
| 445 |
- reg := regexp.MustCompile(`^cgroup on (.*) type cgroup \(.*` + cgroupType + `[,\)]`) |
|
| 445 |
+ reg := regexp.MustCompile(`^.* on (.*) type cgroup \(.*` + cgroupType + `[,\)]`) |
|
| 446 | 446 |
for _, line := range strings.Split(string(output), "\n") {
|
| 447 | 447 |
r := reg.FindStringSubmatch(line) |
| 448 | 448 |
if len(r) == 2 {
|