[lxc-devel] [lxcfs/master] mount hook: mount /sys/devices/system/cpu/online
aither64 on Github
lxc-bot at linuxcontainers.org
Tue May 21 14:06:49 UTC 2019
A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 360 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20190521/f0a31012/attachment.bin>
-------------- next part --------------
From 24ee58a5c782561ed6f2118c63be4b7b8c8b23a4 Mon Sep 17 00:00:00 2001
From: Jakub Skokan <jakub.skokan at havefun.cz>
Date: Tue, 21 May 2019 15:50:54 +0200
Subject: [PATCH] mount hook: mount /sys/devices/system/cpu/online
Signed-off-by: Jakub Skokan <jakub.skokan at havefun.cz>
---
share/lxc.mount.hook.in | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/share/lxc.mount.hook.in b/share/lxc.mount.hook.in
index 74a1e46..c70eec3 100755
--- a/share/lxc.mount.hook.in
+++ b/share/lxc.mount.hook.in
@@ -22,6 +22,13 @@ if [ -d @LXCFSTARGETDIR@/proc/ ]; then
done
fi
+# /sys/devices/system/cpu
+if [ -d @LXCFSTARGETDIR@/sys/devices/system/cpu ] ; then
+ for entry in @LXCFSTARGETDIR@/sys/devices/system/cpu/*; do
+ [ -e "${LXC_ROOTFS_MOUNT}/sys/devices/system/cpu/$(basename $entry)" ] || continue
+ mount -n --bind $entry ${LXC_ROOTFS_MOUNT}/sys/devices/system/cpu/$(basename $entry)
+ done
+fi
# Allow nesting lxcfs
if [ -d ${LXC_ROOTFS_MOUNT}@LXCFSTARGETDIR@/ ]; then
More information about the lxc-devel
mailing list