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

Contents of /trunk/x-setup

Parent Directory Parent Directory | Revision Log Revision Log


Revision 46 - (show annotations) (download)
Tue Apr 12 21:25:21 2005 UTC (9 years, 8 months ago) by wolf31o2
File size: 2234 byte(s)
Added bashlogin and livecd-functions.sh from baselayout.  Cleaned up ALSA support in autoconfig.  Made x-setup use new opengl-update feature --dst-prefix.  Fixed WEP key section in net-setup.

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.13 2005/04/12 21:25:21 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 no_gl() {
27 echo "No OpenGL-capable card found."
28 GLTYPE=xorg-x11
29 }
30
31 ati_gl() {
32 echo "ATI card detected."
33 GLTYPE=ati
34 }
35
36 nv_gl() {
37 echo "NVIDIA card detected."
38 GLTYPE=nvidia
39 }
40
41 get_video_cards() {
42 VIDEO_CARDS=`/sbin/lspci | grep VGA`
43 NUM_CARDS=`echo ${VIDEO_CARDS} | wc -l`
44 if [ ${NUM_CARDS} -eq 1 ]; then
45 NVIDIA=`echo ${VIDEO_CARDS} | grep "nVidia Corporation"`
46 ATI=`echo ${VIDEO_CARDS} | grep "ATI Technologies"`
47 if [ -n "${NVIDIA}" ]; then
48 NVIDIA_CARD=`echo ${NVIDIA} | awk 'BEGIN {RS=" "} /NV[0-9]+/ {print $1}'`
49 if [ -n "${NVIDIA_CARD}" ]; then
50 if [ `echo ${NVIDIA_CARD} | cut -dV -f2` -ge 4 ]; then
51 nv_gl
52 else
53 no_gl
54 fi
55 else
56 no_gl
57 fi
58 elif [ -n "${ATI}" ]; then
59 ATI_CARD=`echo ${ATI} | awk 'BEGIN {RS=" "} /(R|RV|RS)[0-9]+/ {print $1}'`
60 if [ `echo ${ATI_CARD} | grep S` ]; then
61 ATI_CARD_S=`echo ${ATI_CARD} | cut -dS -f2`
62 elif [ `echo ${ATI_CARD} | grep V` ]; then
63 ATI_CARD_V=`echo ${ATI_CARD} | cut -dV -f2`
64 else
65 ATI_CARD=`echo ${ATI_CARD} | cut -dR -f2`
66 fi
67 if [ -n "${ATI_CARD_S}" ] && [ ${ATI_CARD_S} -ge 350 ]; then
68 ati_gl
69 elif [ -n "${ATI_CARD_V}" ] && [ ${ATI_CARD_V} -ge 250 ]; then
70 ati_gl
71 elif [ -n "${ATI_CARD}" ] && [ ${ATI_CARD} -ge 200 ]; then
72 ati_gl
73 else
74 no_gl
75 fi
76 else
77 no_gl
78 fi
79 fi
80 }
81
82 get_video_cards
83
84 if [ -x /usr/sbin/opengl-update-livecd ]
85 then
86 /usr/sbin/opengl-update-livecd $GLTYPE
87 elif [ -x /usr/sbin/opengl-update ]
88 then
89 /usr/sbin/opengl-update --dst-prefix=/etc/opengl $GLTYPE
90 else
91 echo "ERROR: no opengl-update script can be located"
92 exit 1
93 fi
94
95 #exec /usr/bin/xinit

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.20