Fix Nvidia driver sharing when USE_OVERLAYFS is enabled

This commit is contained in:
Kron4ek 2024-08-03 12:04:39 +03:00 committed by GitHub
parent c0cb1c3a94
commit 348758658b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -22,7 +22,7 @@ if (( EUID == 0 )) && [ -z "$ALLOW_ROOT" ]; then
fi
# Conty version
script_version="1.26"
script_version="1.26.1"
# Important variables to manually adjust after modification!
# Needed to avoid problems with mounting due to an incorrect offset.
@ -1097,16 +1097,6 @@ if [ "$(ls "${mount_point}" 2>/dev/null)" ] || launch_wrapper "${mount_command[@
exit
fi
if [ "${USE_OVERLAYFS}" = 1 ]; then
if mount_overlayfs; then
show_msg "Using unionfs"
RW_ROOT=1
else
echo "Failed to mount unionfs"
unset USE_OVERLAYFS
fi
fi
if [ "${NVIDIA_HANDLER}" = 1 ]; then
if [ -f /sys/module/nvidia/version ]; then
unset NVIDIA_SHARED
@ -1197,6 +1187,16 @@ if [ "$(ls "${mount_point}" 2>/dev/null)" ] || launch_wrapper "${mount_command[@
fi
fi
if [ "${USE_OVERLAYFS}" = 1 ]; then
if mount_overlayfs; then
show_msg "Using unionfs"
RW_ROOT=1
else
echo "Failed to mount unionfs"
unset USE_OVERLAYFS
fi
fi
# If SANDBOX_LEVEL is 3, run Xephyr and openbox before running applications
if [ "${SANDBOX}" = 1 ] && [ -n "${SANDBOX_LEVEL}" ] && [ "${SANDBOX_LEVEL}" -ge 3 ]; then
if [ -f "${mount_point}"/usr/bin/Xephyr ]; then