slitaz-boot-scripts rev 145

hwconf.sh: add xarg= for slim.conf/xserver_arguments
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Mar 09 10:16:51 2009 +0000 (2009-03-09)
parents 7d89350f47ed
children 979868f40866
files etc/init.d/hwconf.sh
line diff
     1.1 --- a/etc/init.d/hwconf.sh	Sun Mar 08 00:13:46 2009 +0100
     1.2 +++ b/etc/init.d/hwconf.sh	Mon Mar 09 10:16:51 2009 +0000
     1.3 @@ -56,6 +56,11 @@
     1.4  if [ ! -s /etc/X11/screen.conf -a -x /usr/bin/slim ]; then
     1.5  	# $HOME is not yet set.
     1.6  	HOME=/root
     1.7 +	if grep -q "xarg=*" /proc/cmdline; then
     1.8 +		# Add an extra argument to xserver_arguments (xarg=-2button)
     1.9 +		XARG=`cat /proc/cmdline | sed 's/.*xarg=\([^ ]*\).*/\1/'`
    1.10 +		sed -i "s|-screen|$XARG -screen|" /etc/slim.conf
    1.11 +	fi
    1.12  	if grep -q "screen=*" /proc/cmdline; then
    1.13  		export NEW_SCREEN=`cat /proc/cmdline | sed 's/.*screen=\([^ ]*\).*/\1/'`
    1.14  		if [ "$NEW_SCREEN" = "text" ]; then