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

Contents of /trunk/x-setup

Parent Directory Parent Directory | Revision Log Revision Log


Revision 18 - (hide annotations) (download)
Fri Nov 19 16:11:24 2004 UTC (9 years, 10 months ago) by wolf31o2
File size: 2097 byte(s)
Updating for GameCD

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 wolf31o2 18 # $Header: /var/cvsroot/gentoo/src/livecd-tools/x-setup,v 1.4 2004/11/19 16:11:24 wolf31o2 Exp $
5 wolf31o2 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 wolf31o2 16 #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 wolf31o2 5 if [ -e /proc/splash ]
38     then
39 wolf31o2 16 #echo "*******************************"
40     #echo "Entering Vesa browser-only mode"
41     #echo "*******************************"
42     #sleep 3
43 wolf31o2 10 GLTYPE=xorg-x11
44 wolf31o2 5 fi
45     fi
46    
47     fi
48 wolf31o2 18 if [ -x /usr/sbin/opengl-update-livecd ]
49     then
50     /usr/sbin/opengl-update-livecd $GLTYPE
51     else
52     opengl-update $GLTYPE
53     fi
54 wolf31o2 5
55     if [ ! -e /etc/sysconfig/mouse ]
56     then
57     echo "A mouse could not be detected; aborting."
58     echo "Please make sure a mouse is attached to your system."
59     exit 1
60     fi
61     source /etc/sysconfig/mouse
62    
63     VERTREFRESH="\`ddcxinfo-knoppix -vsync\`"
64     if [ "$VERTREFRESH" = "0-0" ]
65     then
66     echo "No DDC information detected; assuming reasonable defaults."
67     VERTREFRESH=50-80
68     HORIZSYNC=30-70
69     else
70     HORIZSYNC="\`ddcxinfo-knoppix -hsync\`"
71     fi
72    
73     sed -i -e "s:##MOUSEPROTO##:${XMOUSETYPE}:" \
74     -e "s:##MOUSEDEV##:${DEVICE}:" \
75     -e "s:##VERTREFRESH##:${VERTREFRESH}:" \
76     -e "s:##HORIZSYNC##:${HORIZSYNC}:" \
77     -e "s:DefaultColorDepth 16:DefaultColorDepth 24:" \
78     /etc/X11/XF86Config-4
79    
80     #exec /usr/X11R6/bin/xinit

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.20