mirror of
https://github.com/QuixiAI/nvdriver.git
synced 2026-12-06 06:28:39 +00:00
uninstall.sh: clean up unmounted regular-file placeholders even after service stop
This commit is contained in:
11
uninstall.sh
11
uninstall.sh
@ -22,10 +22,13 @@ if [ "$UNLOAD" = "1" ]; then
|
||||
# bind mounts the service did not own (e.g. from install.sh's own --bind)
|
||||
for f in /dev/nvidia[0-9]* /dev/nvidiactl /dev/nvidia-uvm /dev/nvidia-modeset; do
|
||||
if mountpoint -q "$f" 2>/dev/null; then
|
||||
if sudo umount "$f" 2>/dev/null; then
|
||||
# Remove regular-file placeholders created by bind_dev_nodes.sh; preserve real char devices.
|
||||
if [ -f "$f" ] && [ ! -c "$f" ]; then sudo rm -f -- "$f"; fi
|
||||
fi
|
||||
sudo umount "$f" 2>/dev/null || true
|
||||
fi
|
||||
# Remove regular-file placeholders created by bind_dev_nodes.sh (including
|
||||
# those already unmounted by nvdriver-devnodes.service); preserve real char
|
||||
# devices, symlinks, and anything still mounted.
|
||||
if ! mountpoint -q "$f" 2>/dev/null && [ -f "$f" ] && [ ! -c "$f" ] && [ ! -L "$f" ]; then
|
||||
sudo rm -f -- "$f"
|
||||
fi
|
||||
done
|
||||
for m in nvidia_rs_drm nvidia_rs_modeset nvidia_rs_peermem nvidia_rs_modeset_bridge nvidia_rs_uvm_bridge nvidia_rs; do
|
||||
|
||||
Reference in New Issue
Block a user