slitaz-boot-scripts rev 189

hwconf.sh: add support for Xorg autoconfig
author Christophe Lincoln <pankso@slitaz.org>
date Mon Jan 04 23:34:50 2010 +0100 (2010-01-04)
parents 7512d6d48538
children aeec02b61fde
files etc/init.d/hwconf.sh
line diff
     1.1 --- a/etc/init.d/hwconf.sh	Mon Jan 04 16:44:56 2010 +0000
     1.2 +++ b/etc/init.d/hwconf.sh	Mon Jan 04 23:34:50 2010 +0100
     1.3 @@ -15,6 +15,13 @@
     1.4  			DRIVER=${opt#sound=} ;;
     1.5  		xarg=*)
     1.6  			XARG="$XARG ${opt#xarg=}" ;;
     1.7 +		screen=text)
     1.8 +				# Disable X.
     1.9 +				echo -n "Disabling X login manager: slim..."
    1.10 +				. /etc/rcS.conf
    1.11 +				RUN_DAEMONS=`echo $RUN_DAEMONS | sed s/' slim'/''/`
    1.12 +				sed -i s/"RUN_DAEMONS.*"/"RUN_DAEMONS=\"$RUN_DAEMONS\"/" /etc/rcS.conf
    1.13 +				status ;;
    1.14  		screen=*)
    1.15  			SCREEN=${opt#screen=} ;;
    1.16  		*)
    1.17 @@ -64,8 +71,24 @@
    1.18  	echo "Unable to configure sound card."
    1.19  fi
    1.20  
    1.21 +# Xorg auto configuration.
    1.22 +if [ ! -s /etc/X11/xorg.conf -a -x /usr/bin/Xorg ]; then
    1.23 +	echo "Configuring Xorg..."
    1.24 +	# $HOME is not yet set.
    1.25 +	HOME=/root
    1.26 +	Xorg -configure
    1.27 +	mv -f /root/xorg.conf.new /etc/X11/xorg.conf
    1.28 +	sed -i 's|/usr/bin/Xvesa|/usr/bin/Xorg|' /etc/slim.conf
    1.29 +	sed -i s/"^xserver_arguments"/'\#xserver_arguments'/ /etc/slim.conf
    1.30 +	tazx config-xorg
    1.31 +fi
    1.32 +
    1.33  # Screen size config for slim/Xvesa (last config dialog before login).
    1.34 -if [ ! -s /etc/X11/screen.conf -a -x /usr/bin/slim ]; then
    1.35 +#
    1.36 +# NOTE: Xvesa is unmaintained, package will be removed and all related
    1.37 +# code cleaned 
    1.38 +#
    1.39 +if [ ! -s /etc/X11/screen.conf -a -x /usr/bin/Xvesa ]; then
    1.40  	# $HOME is not yet set.
    1.41  	HOME=/root
    1.42  	if [ -n "$XARG" ]; then