From 746b9f430396520c650add33993b7139d86c5c36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Graber?= Date: Sun, 14 Jan 2024 16:30:22 -0500 Subject: [PATCH] lxc.mount.hook: Skip cpu sysfs logic if missing target MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #625 Suggested-by: amateur80lvl Signed-off-by: Stéphane Graber --- share/lxc.mount.hook.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/lxc.mount.hook.in b/share/lxc.mount.hook.in index cf81d2c6..6fd13b06 100755 --- a/share/lxc.mount.hook.in +++ b/share/lxc.mount.hook.in @@ -24,7 +24,7 @@ if [ -d {{LXCFSTARGETDIR}}/proc/ ]; then fi # /sys/devices/system/cpu -if [ -d {{LXCFSTARGETDIR}}/sys/devices/system/cpu ] ; then +if [ -d {{LXCFSTARGETDIR}}/sys/devices/system/cpu ] && [ -d "${LXC_ROOTFS_MOUNT}/sys/devices/system/cpu" ]; then if [ -f {{LXCFSTARGETDIR}}/sys/devices/system/cpu/uevent ]; then mount -n --bind {{LXCFSTARGETDIR}}/sys/devices/system/cpu "${LXC_ROOTFS_MOUNT}/sys/devices/system/cpu" else