Skip to content

Commit

Permalink
init: skip nvidia mounts when file already exists, Fix #1030
Browse files Browse the repository at this point in the history
Signed-off-by: Luca Di Maio <[email protected]>
  • Loading branch information
89luca89 committed Nov 19, 2023
1 parent 2b21c1f commit 5066e62
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions distrobox-init
Original file line number Diff line number Diff line change
Expand Up @@ -1552,6 +1552,14 @@ if [ "${nvidia}" -eq 1 ]; then
sed "s|/run/host/usr/lib64/|${lib64_dir}|g" |
sed "s|/run/host/usr/lib32/|${lib32_dir}|g")"

# If file exists, just continue
# this may happen for directories like /usr/lib/nvidia/xorg/foo.so
# where the directory is already bind mounted (ro) and we don't need
# to mount further files in it.
if [ -e "${nvidia_lib}" ]; then
continue
fi

type="file"
if [ -L "${nvidia_lib}" ]; then
type="link"
Expand Down

0 comments on commit 5066e62

Please sign in to comment.