summaryrefslogtreecommitdiff
path: root/nvidia/pre-install
diff options
context:
space:
mode:
authorMatt Housh <jaeger@crux.ninja>2018-08-11 13:42:30 -0500
committerMatt Housh <jaeger@crux.ninja>2018-08-11 13:42:30 -0500
commitcb363308adfe57040b8c235b5fdd22ca85cf9d27 (patch)
treeb7741f399d86ac2153ae4500b015a8b81b0e41f1 /nvidia/pre-install
parent1def6a63472b13be6280a744672da865560d5915 (diff)
downloadopt-cb363308adfe57040b8c235b5fdd22ca85cf9d27.tar.gz
opt-cb363308adfe57040b8c235b5fdd22ca85cf9d27.tar.xz
nvidia: converted to GLVND
Diffstat (limited to 'nvidia/pre-install')
-rwxr-xr-xnvidia/pre-install20
1 files changed, 20 insertions, 0 deletions
diff --git a/nvidia/pre-install b/nvidia/pre-install
new file mode 100755
index 000000000..ffb223830
--- /dev/null
+++ b/nvidia/pre-install
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+# check for root privileges needed for gl-select
+if [ ! $(id -u) -eq 0 ]; then
+ echo "root privileges needed to run this pre-install script!"
+ exit 1
+fi
+
+# is gl-select available?
+if [ -x /usr/bin/gl-select ]; then
+ printf '%b' "\033[33;1mNOTE: With the introduction of GLVND, gl-select is no
+longer needed. This pre-install script will reset gl-select
+to its default xorg setting if needed. It is recommended that
+gl-select be uninstalled after installing libglvnd and
+upgrading mesa3d.\033[0m\n"
+ # is nvidia currently selected?
+ if /usr/bin/gl-select status | grep -q 'nvidia.*is selected'; then
+ /usr/bin/gl-select use xorg
+ fi
+fi

Generated by cgit