about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJuan RP <xtraeme@gmail.com>2014-08-08 01:54:56 +0200
committerJuan RP <xtraeme@gmail.com>2014-08-08 01:54:56 +0200
commit387f205f49b115694727e60290da9674d15efb56 (patch)
treefc781fd1ac6b7899a7843a91e6645ac90f3bafd1
parent2edcbf0607e5108f46d7cbeadb54b1c18c9ef60c (diff)
downloadrunit-void-387f205f49b115694727e60290da9674d15efb56.tar.gz
runit-void-387f205f49b115694727e60290da9674d15efb56.tar.xz
runit-void-387f205f49b115694727e60290da9674d15efb56.zip
core-services/00-pseudofs.sh: do not mount cgroupfs on virtualization.
-rw-r--r--core-services/00-pseudofs.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/core-services/00-pseudofs.sh b/core-services/00-pseudofs.sh
index 2bdc69e..5169f45 100644
--- a/core-services/00-pseudofs.sh
+++ b/core-services/00-pseudofs.sh
@@ -8,5 +8,8 @@ mountpoint -q /dev || mount -t devtmpfs dev /dev -o mode=0755,nosuid
 mkdir -p -m0755 /run/runit /run/lvm /run/user /dev/pts /dev/shm
 mountpoint -q /dev/pts || mount -n -t devpts devpts /dev/pts -o mode=0620,gid=5,nosuid,noexec
 mountpoint -q /dev/shm || mount -n -t tmpfs shm /dev/shm -o mode=1777,nosuid,nodev
-mountpoint -q /sys/fs/cgroup || mount -t tmpfs cgroup /sys/fs/cgroup -o mode=0755
-awk '$4==1 { system("mountpoint -q /sys/fs/cgroup/" $1 " || mount -t cgroup -o " $1 ",x-mount.mkdir cgroup /sys/fs/cgroup/" $1) }' /proc/cgroups
+
+if [ -z "$VIRTUALIZATION" ]; then
+    mountpoint -q /sys/fs/cgroup || mount -t tmpfs cgroup /sys/fs/cgroup -o mode=0755
+    awk '$4==1 { system("mountpoint -q /sys/fs/cgroup/" $1 " || mount -t cgroup -o " $1 ",x-mount.mkdir cgroup /sys/fs/cgroup/" $1) }' /proc/cgroups
+fi