Skip to content

Commit

Permalink
Merge pull request #626 from stgraber/main
Browse files Browse the repository at this point in the history
lxc.mount.hook: Skip cpu sysfs logic if missing target
  • Loading branch information
hallyn authored Jan 15, 2024
2 parents 7d508df + 746b9f4 commit 6540dd4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion share/lxc.mount.hook.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6540dd4

Please sign in to comment.