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

Contents of /trunk/x-setup

Parent Directory Parent Directory | Revision Log Revision Log


Revision 32 - (show annotations) (download)
Thu Feb 3 12:25:48 2005 UTC (9 years, 5 months ago) by wolf31o2
File size: 2226 byte(s)
Added check for xorg.conf and changed sed line to xorg.conf.

1 #!/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.5 2005/02/03 12:25:48 wolf31o2 Exp $
5
6 # Check for an xorg.conf
7 if [ ! -e /etc/X11/xorg.conf ]
8 then
9 echo "ERROR: /etc/X11/xorg.conf cannot be found! Exiting"
10 exit 1
11 fi
12
13 #first, get paths right if we're getting started b4 login
14 source /etc/profile
15
16 echo "0" > /proc/sys/kernel/printk
17 CMDLINE="`cat /proc/cmdline`"
18 for x in $CMDLINE
19 do
20 if [ "$x" = "agpgart" ]
21 then
22 modprobe agpgart > /dev/null 2>&1
23 fi
24 done
25
26 GLTYPE=nvidia
27 #now, for the key component :)
28 modprobe nvidia > /dev/null 2>&1
29 if [ "`lsmod | cut -f1 -d\" \" | grep ^nvidia$`" = "nvidia" ]
30 then
31 echo "NVIDIA driver loaded."
32 else
33 modprobe fglrx > /dev/null 2>&1
34 if [ "`lsmod | cut -f1 -d\" \" | grep ^fglrx$`" = "fglrx" ]
35 then
36 echo "ATI driver loaded."
37 GLTYPE=ati
38 else
39 #echo "**********************************************************"
40 #echo "NVIDIA or ATI drivers unable to load; aborting."
41 #echo "This demo requires modern NVIDIA or ATI graphics hardware."
42 #echo "**********************************************************"
43 echo ""
44 if [ -e /proc/splash ]
45 then
46 #echo "*******************************"
47 #echo "Entering Vesa browser-only mode"
48 #echo "*******************************"
49 #sleep 3
50 GLTYPE=xorg-x11
51 fi
52 fi
53
54 fi
55 if [ -x /usr/sbin/opengl-update-livecd ]
56 then
57 /usr/sbin/opengl-update-livecd $GLTYPE
58 else
59 opengl-update $GLTYPE
60 fi
61
62 if [ ! -e /etc/sysconfig/mouse ]
63 then
64 echo "A mouse could not be detected; aborting."
65 echo "Please make sure a mouse is attached to your system."
66 exit 1
67 fi
68 source /etc/sysconfig/mouse
69
70 VERTREFRESH="\`ddcxinfo-knoppix -vsync\`"
71 if [ "$VERTREFRESH" = "0-0" ]
72 then
73 echo "No DDC information detected; assuming reasonable defaults."
74 VERTREFRESH=50-80
75 HORIZSYNC=30-70
76 else
77 HORIZSYNC="\`ddcxinfo-knoppix -hsync\`"
78 fi
79
80 sed -i -e "s:##MOUSEPROTO##:${XMOUSETYPE}:" \
81 -e "s:##MOUSEDEV##:${DEVICE}:" \
82 -e "s:##VERTREFRESH##:${VERTREFRESH}:" \
83 -e "s:##HORIZSYNC##:${HORIZSYNC}:" \
84 -e "s:DefaultColorDepth 16:DefaultColorDepth 24:" \
85 /etc/X11/xorg.conf
86
87 #exec /usr/X11R6/bin/xinit

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.20