All pastes #1532071 Raw Edit

video chooser script

public text v1 · immutable
#1532071 ·published 2009-08-17 02:11 UTC
rendered paste body
#!/sbin/runscript
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-misc/ntp/files/ntp-client.rc,v 1.11 2007/03/09 17:24:28 vapier Exp $

depend() {
	before xdm
}

start() {
        /usr/sbin/lspci | /bin/grep "00:02.1" 
	if [ $? -eq 0 ]; then
		/usr/bin/eselect opengl set xorg-x11
		/bin/cp /etc/X11/xorg.conf.intel /etc/X11/xorg.conf
		ebegin "Setting graphics card for XDM (INTEL)"
	else
		/usr/bin/eselect opengl set nvidia
		/bin/cp /etc/X11/xorg.conf.nvidia /etc/X11/xorg.conf
		ebegin "Setting graphics card for XDM (NVIDIA)"
	fi
	
	eend $? "Failed to set graphics card"
}