slitaz-boot-scripts rev 27

Add option screen=text (dont start X login manager)
author Christophe Lincoln <pankso@slitaz.org>
date Sat Feb 23 01:40:59 2008 +0100 (2008-02-23)
parents 0a34abfb23d2
children f34a92a12c88
files etc/init.d/bootopts.sh
line diff
     1.1 --- a/etc/init.d/bootopts.sh	Tue Feb 19 14:23:34 2008 +0100
     1.2 +++ b/etc/init.d/bootopts.sh	Sat Feb 23 01:40:59 2008 +0100
     1.3 @@ -55,7 +55,7 @@
     1.4  fi
     1.5  if [ "`fdisk -l | grep swap`" ]; then
     1.6  	for SWAP_DEV in `fdisk -l | grep swap | awk '{ print $1 }'`; do
     1.7 -		echo "Swap memory detected on : $SWAP_DEV"
     1.8 +		echo "Swap memory detected on: $SWAP_DEV"
     1.9  		swapon $SWAP_DEV
    1.10  	done
    1.11  fi
    1.12 @@ -79,3 +79,17 @@
    1.13  	status
    1.14  fi
    1.15  
    1.16 +# Check for a specified screen (screen=*).
    1.17 +#
    1.18 +if grep -q "screen=*" /proc/cmdline; then
    1.19 +	SCREEN=`cat /proc/cmdline | sed 's/.*screen=\([^ ]*\).*/\1/'`
    1.20 +	if [ "$SCREEN" = "text" ];
    1.21 +		echo -n "Disabling X login manager: slim..."
    1.22 +		sed -i s/'slim'/''/ /etc/rcS.conf
    1.23 +		status
    1.24 +	else
    1.25 +		echo "Option not yet implemented: screen=$SCREEN"
    1.26 +		sleep 2
    1.27 +	fi
    1.28 +fi
    1.29 +