summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2012-12-17 00:10:31 +0100
committerDaniel Baumann <mail@daniel-baumann.ch>2013-05-06 14:50:02 +0200
commit4908d4d6c14d61f5889bafafc20d0e1749cccd85 (patch)
tree03c4e81bfc45de2630ebf89bd086d2629b2454c6
parent7ce3113f44550191fab4408f88843133331a5b5e (diff)
downloadvyos-live-build-4908d4d6c14d61f5889bafafc20d0e1749cccd85.tar.gz
vyos-live-build-4908d4d6c14d61f5889bafafc20d0e1749cccd85.zip
Adding default hook to use mesa glx renderer.
-rwxr-xr-xfunctions/defaults.sh6
-rwxr-xr-xshare/hooks/0180-update-glx-alternative.chroot9
2 files changed, 13 insertions, 2 deletions
diff --git a/functions/defaults.sh b/functions/defaults.sh
index 977498d87..814b1fed9 100755
--- a/functions/defaults.sh
+++ b/functions/defaults.sh
@@ -616,7 +616,8 @@ Set_defaults ()
remove-backup-files \
remove-temporary-files \
remove-log-files \
- update-nvidia-alternative}"
+ update-nvidia-alternative \
+ update-glx-alternative}"
;;
kubuntu)
@@ -635,7 +636,8 @@ Set_defaults ()
remove-backup-files \
remove-temporary-files \
remove-log-files \
- update-nvidia-alternative}"
+ update-nvidia-alternative \
+ update-glx-alternative}"
;;
esac
diff --git a/share/hooks/0180-update-glx-alternative.chroot b/share/hooks/0180-update-glx-alternative.chroot
new file mode 100755
index 000000000..8c36c43f9
--- /dev/null
+++ b/share/hooks/0180-update-glx-alternative.chroot
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+set -e
+
+# Use mesa renderer by default
+if [ -e /etc/alternatives/glx ]
+then
+ update-alternatives --quiet --set glx /usr/lib/mesa-diverted
+fi