slitaz-boot-scripts rev 180

hwconf.sh: allow multiple xarg=
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Oct 04 15:32:39 2009 +0200 (2009-10-04)
parents 317bbc101951
children 16c27ed1f2c9
files etc/init.d/hwconf.sh
line diff
     1.1 --- a/etc/init.d/hwconf.sh	Tue Sep 15 20:22:14 2009 +0200
     1.2 +++ b/etc/init.d/hwconf.sh	Sun Oct 04 15:32:39 2009 +0200
     1.3 @@ -7,13 +7,14 @@
     1.4  . /etc/init.d/rc.functions
     1.5  
     1.6  # Parse cmdline args for boot options (See also rcS and bootopts.sh).
     1.7 +XARG=""
     1.8  for opt in `cat /proc/cmdline`
     1.9  do
    1.10  	case $opt in
    1.11  		sound=*)
    1.12  			DRIVER=${opt#sound=} ;;
    1.13 -		xargs=*)
    1.14 -			XARGS=${opt#xargs=} ;;
    1.15 +		xarg=*)
    1.16 +			XARG="$XARG ${opt#xarg=}" ;;
    1.17  		screen=*)
    1.18  			SCREEN=${opt#screen=} ;;
    1.19  		*)
    1.20 @@ -67,9 +68,9 @@
    1.21  if [ ! -s /etc/X11/screen.conf -a -x /usr/bin/slim ]; then
    1.22  	# $HOME is not yet set.
    1.23  	HOME=/root
    1.24 -	if [ -n "$XARGS" ]; then
    1.25 +	if [ -n "$XARG" ]; then
    1.26  		# Add an extra argument to xserver_arguments (xarg=-2button)
    1.27 -		sed -i "s|-screen|$XARG -screen|" /etc/slim.conf
    1.28 +		sed -i "s| -screen|$XARG -screen|" /etc/slim.conf
    1.29  	fi
    1.30  	if [ -n "$SCREEN" ]; then
    1.31  		case "$SCREEN" in