| 1 | #!/bin/bash |
1 | #!/bin/bash |
| 2 | # Copyright 1999-1999-2005 Gentoo Foundation |
2 | # Copyright 1999-1999-2005 Gentoo Foundation |
| 3 | # Distributed under the terms of the GNU General Public License v2 |
3 | # Distributed under the terms of the GNU General Public License v2 |
| 4 | # $Header: /var/cvsroot/gentoo/src/livecd-tools/x-setup,v 1.15 2006/06/09 01:05:46 wolf31o2 Exp $ |
4 | # $Header: /var/cvsroot/gentoo/src/livecd-tools/x-setup,v 1.16 2006/08/01 19:38:36 wolf31o2 Exp $ |
| 5 | |
5 | |
| 6 | # Check for an xorg.conf |
6 | # Check for an xorg.conf |
| 7 | if [ ! -e /etc/X11/xorg.conf ] |
7 | if [ ! -e /etc/X11/xorg.conf ] |
| 8 | then |
8 | then |
| 9 | echo "ERROR: /etc/X11/xorg.conf cannot be found! Exiting" |
9 | echo "ERROR: /etc/X11/xorg.conf cannot be found! Exiting" |
| … | |
… | |
| 36 | get_video_cards || exit 1 |
36 | get_video_cards || exit 1 |
| 37 | |
37 | |
| 38 | if [ -x /usr/sbin/opengl-update-livecd ] |
38 | if [ -x /usr/sbin/opengl-update-livecd ] |
| 39 | then |
39 | then |
| 40 | /usr/sbin/opengl-update-livecd $GLTYPE |
40 | /usr/sbin/opengl-update-livecd $GLTYPE |
|
|
41 | elif [ -x /usr/bin/eselect -a -e /usr/share/eselect/modules/opengl.eselect ] |
|
|
42 | then |
|
|
43 | /usr/bin/eselect opengl set $GLTYPE --dst-prefix=/etc/opengl |
| 41 | elif [ -x /usr/sbin/opengl-update ] |
44 | elif [ -x /usr/sbin/opengl-update ] |
| 42 | then |
45 | then |
| 43 | /usr/sbin/opengl-update --dst-prefix=/etc/opengl $GLTYPE |
46 | /usr/sbin/opengl-update --dst-prefix=/etc/opengl $GLTYPE |
| 44 | elif [ -x /usr/bin/eselect -a -e /usr/share/eselect/modules/opengl.eselect ] |
|
|
| 45 | then |
|
|
| 46 | /usr/bin/eselect opengl set $GLTYPE --dst-prefix=/etc/opengl |
|
|
| 47 | else |
47 | else |
| 48 | echo "ERROR: no opengl-update script can be located" |
48 | echo "ERROR: no opengl-update script can be located" |
| 49 | exit 1 |
49 | exit 1 |
| 50 | fi |
50 | fi |
| 51 | |
51 | |