aboutsummaryrefslogtreecommitdiff
path: root/system/nvidia-legacy390-driver/nvidia-switch
diff options
context:
space:
mode:
authorLenard Spencer <lenardrspencer@gmail.com>2020-04-17 10:45:41 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2020-04-17 10:45:41 +0700
commit9a58d29c1a8ad1891a74ccd670fc7b23d2e1edf3 (patch)
treea0f064ab41506564d3545c1e8e27559924276a82 /system/nvidia-legacy390-driver/nvidia-switch
parent8db865d339f9709e12b0911575dbe71d4dd47a60 (diff)
system/nvidia-legacy390-driver: Fix nvidia-switch.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/nvidia-legacy390-driver/nvidia-switch')
-rw-r--r--system/nvidia-legacy390-driver/nvidia-switch7
1 files changed, 6 insertions, 1 deletions
diff --git a/system/nvidia-legacy390-driver/nvidia-switch b/system/nvidia-legacy390-driver/nvidia-switch
index aa92b3a01a724..2f57366cfdbb2 100644
--- a/system/nvidia-legacy390-driver/nvidia-switch
+++ b/system/nvidia-legacy390-driver/nvidia-switch
@@ -113,7 +113,7 @@ save_glx(){
case "$1" in
"nvidia")
if [ -e libglx.so ]; then
- mv libglx.so libglx.so-xorg
+ cp -a libglx.so libglx.so-xorg
fi
ln -sf libglx.so.$NV_VERSION libglx.so
;;
@@ -124,6 +124,11 @@ save_glx(){
else
if [ ! -e libglx.so ]; then
echo -e "WARNING: libglx.so not found! Please reinstall xorg-server!\n"
+ else
+ if [ -L libglx.so ]; then
+ rm libglx.so
+ echo -e "WARNING: removed dead symlink libglx.so! Please reinstall xorg-server!\n"
+ fi
fi
fi
;;