/[livecd-tools]/trunk/x-setup
Gentoo

Contents of /trunk/x-setup

Parent Directory Parent Directory | Revision Log Revision Log


Revision 5 - (hide annotations) (download)
Fri May 14 13:27:25 2004 UTC (9 years, 11 months ago) by wolf31o2
File size: 2243 byte(s)
Adding OpenGL and X scripts.

1 wolf31o2 5 #!/bin/bash
2     # Copyright 1999-2004 Gentoo Technologies, Inc.
3     # Distributed under the terms of the GNU General Public License v2
4     # $Header: /var/cvsroot/gentoo/src/livecd-tools/x-setup,v 1.1 2004/05/14 13:27:25 wolf31o2 Exp $
5    
6     #first, get paths right if we're getting started b4 login
7     source /etc/profile
8    
9     echo "0" > /proc/sys/kernel/printk
10     CMDLINE="`cat /proc/cmdline`"
11     for x in $CMDLINE
12     do
13     if [ "$x" = "agpgart" ]
14     then
15     modprobe agpgart > /dev/null 2>&1
16     fi
17     done
18    
19     GLTYPE=nvidia
20     #now, for the key component :)
21     modprobe nvidia > /dev/null 2>&1
22     if [ "`lsmod | cut -f1 -d\" \" | grep ^nvidia$`" = "nvidia" ]
23     then
24     echo "NVIDIA driver loaded."
25     else
26     modprobe fglrx > /dev/null 2>&1
27     if [ "`lsmod | cut -f1 -d\" \" | grep ^fglrx$`" = "fglrx" ]
28     then
29     echo "ATI driver loaded."
30     GLTYPE=ati
31     else
32     ;echo "**********************************************************"
33     ;echo "NVIDIA or ATI drivers unable to load; aborting."
34     ;echo "This demo requires modern NVIDIA or ATI graphics hardware."
35     ;echo "**********************************************************"
36     ;echo ""
37     if [ -e /proc/splash ]
38     then
39     ;echo "*******************************"
40     ;echo "Entering Vesa browser-only mode"
41     ;echo "*******************************"
42     ;sleep 3
43     GLTYPE=xfree
44     fi
45     fi
46    
47     fi
48     opengl-update $GLTYPE
49    
50     if [ ! -e /etc/sysconfig/mouse ]
51     then
52     echo "A mouse could not be detected; aborting."
53     echo "Please make sure a mouse is attached to your system."
54     exit 1
55     fi
56     source /etc/sysconfig/mouse
57    
58     VERTREFRESH="\`ddcxinfo-knoppix -vsync\`"
59     if [ "$VERTREFRESH" = "0-0" ]
60     then
61     echo "No DDC information detected; assuming reasonable defaults."
62     VERTREFRESH=50-80
63     HORIZSYNC=30-70
64     else
65     HORIZSYNC="\`ddcxinfo-knoppix -hsync\`"
66     fi
67    
68     sed -i -e "s:##MOUSEPROTO##:${XMOUSETYPE}:" \
69     -e "s:##MOUSEDEV##:${DEVICE}:" \
70     -e "s:##VERTREFRESH##:${VERTREFRESH}:" \
71     -e "s:##HORIZSYNC##:${HORIZSYNC}:" \
72     -e "s:DefaultColorDepth 16:DefaultColorDepth 24:" \
73     /etc/X11/XF86Config-4
74    
75     # Now, we need to export LD_PATH since env-update can't do this for us (no python,
76     #/etc/env.d/09opengl removed...
77    
78     #cp /etc/ld.so.conf.orig /etc/ld.so.conf
79     #echo /usr/lib/opengl/${GLTYPE}/lib >> /etc/ld.so.conf
80     #ldconfig
81     # time to fire up X
82     #exec /usr/X11R6/bin/xinit

Properties

Name Value
svn:eol-style native
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.20