slitaz-boot-scripts rev 40

Enhanced screen= kernel parameter
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Feb 25 21:59:53 2008 +0000 (2008-02-25)
parents 2bba74627aab
children 15b59bbf70c4
files etc/init.d/bootopts.sh etc/init.d/hwconf.sh
line diff
     1.1 --- a/etc/init.d/bootopts.sh	Mon Feb 25 17:04:17 2008 +0100
     1.2 +++ b/etc/init.d/bootopts.sh	Mon Feb 25 21:59:53 2008 +0000
     1.3 @@ -95,23 +95,6 @@
     1.4  	status
     1.5  fi
     1.6  
     1.7 -# Check for a specified screen (screen=*).
     1.8 -#
     1.9 -if grep -q "screen=*" /proc/cmdline; then
    1.10 -	SCREEN=`cat /proc/cmdline | sed 's/.*screen=\([^ ]*\).*/\1/'`
    1.11 -	if [ "$SCREEN" = "text" ]; then
    1.12 -		echo -n "Disabling X login manager: slim..."
    1.13 -		sed -i s/'slim'/''/ /etc/rcS.conf
    1.14 -		status
    1.15 -		# Creat /etc/X11/screen.conf to avoid tazx execution by hwconf.sh
    1.16 -		mkdir -p /etc/X11
    1.17 -		echo 'SCREEN=1024x768x24' > /etc/X11/screen.conf
    1.18 -	else
    1.19 -		echo "Option not yet implemented: screen=$SCREEN"
    1.20 -		sleep 2
    1.21 -	fi
    1.22 -fi
    1.23 -
    1.24  # Laptop option to load ac and battery Kernel modules.
    1.25  if grep -q "laptop" /proc/cmdline; then
    1.26  	echo "Loading laptop modules: ac battery..."
     2.1 --- a/etc/init.d/hwconf.sh	Mon Feb 25 17:04:17 2008 +0100
     2.2 +++ b/etc/init.d/hwconf.sh	Mon Feb 25 21:59:53 2008 +0000
     2.3 @@ -42,5 +42,16 @@
     2.4  
     2.5  # Screen size config for slim/Xvesa.
     2.6  if [ ! -f /etc/X11/screen.conf -a -x /usr/bin/slim ]; then
     2.7 -	tazx
     2.8 +	if grep -q "screen=*" /proc/cmdline; then
     2.9 +		export NEW_SCREEN=`cat /proc/cmdline | sed 's/.*screen=\([^ ]*\).*/\1/'`
    2.10 +		if [ "$NEW_SCREEN" = "text" ]; then
    2.11 +			echo -n "Disabling X login manager: slim..."
    2.12 +			sed -i s/'slim'/''/ /etc/rcS.conf
    2.13 +			status
    2.14 +		else
    2.15 +			tazx
    2.16 +		fi
    2.17 +	else
    2.18 +		tazx
    2.19 +	fi
    2.20  fi