Last active
November 26, 2017 14:43
-
-
Save palica/c8d7722aab57de8a2437fa8b9d00ba42 to your computer and use it in GitHub Desktop.
/etc/init.d/sysfs for lxd to be able to mount cgroups on container startup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- sysfs 2017-11-25 00:02:31.150396179 +0100 | |
+++ sysfs.palica 2017-11-26 11:22:54.041218857 +0100 | |
@@ -15,7 +15,8 @@ | |
depend() | |
{ | |
- keyword -docker -lxc -prefix -systemd-nspawn -vserver | |
+# Removing -lxc keyword as we need to run cgroup mount inside container | |
+ keyword -docker -prefix -systemd-nspawn -vserver | |
} | |
mount_sys() | |
@@ -229,9 +230,13 @@ | |
start() | |
{ | |
- mount_sys | |
- mount_misc | |
+# Commenting out sys as it gets mounted from LXD | |
+# Commenting out misc as I don't need it in LXD - please comment if it is not true | |
+# Commenting out restorecon as I don't use SELinux | |
+ #mount_sys | |
+ #mount_misc | |
mount_cgroups | |
- restorecon_sys | |
+ #restorecon_sys | |
return 0 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
openRC
should be smart enough to not try to mountsysfs
again if it detects that it is already mounted. If that's not the case thenopenRC
should be made to respect existing sysfs mounts.