slitaz-boot-scripts rev 162

bootopts.sh: Clean and upate comments
author Christophe Lincoln <pankso@slitaz.org>
date Sun Apr 26 16:44:25 2009 +0200 (2009-04-26)
parents 2f1bca639842
children ae298db60009
files etc/init.d/bootopts.sh
line diff
     1.1 --- a/etc/init.d/bootopts.sh	Sun Apr 26 16:31:46 2009 +0200
     1.2 +++ b/etc/init.d/bootopts.sh	Sun Apr 26 16:44:25 2009 +0200
     1.3 @@ -29,7 +29,6 @@
     1.4  }
     1.5  
     1.6  # Mount /home and check for user hacker home dir.
     1.7 -#
     1.8  mount_home()
     1.9  {
    1.10  	echo "Home has been specified to $DEVICE..."
    1.11 @@ -53,7 +52,7 @@
    1.12  	else
    1.13  		echo "Unable to find $DEVICE... "
    1.14  	fi
    1.15 -	# Move all hacker dir if needed.
    1.16 +	# Move all user dir if needed.
    1.17  	if [ ! -d "/home/$USER" ] ; then
    1.18  		mv /tmp/$USER-files /home/$USER
    1.19  		chown -R $USER.$USER /home/$USER
    1.20 @@ -64,6 +63,8 @@
    1.21  
    1.22  # Default user account without password (uid=1000). In live mode the option
    1.23  # user=name can be used, but user must be add before home= to have home dir.
    1.24 +# This option is not handled by a loop and case like other and without
    1.25 +# effect on a installed system.
    1.26  if ! grep -q "1000:1000" /etc/passwd; then
    1.27  	if grep -q "user=" /proc/cmdline; then
    1.28  		USER=`cat /proc/cmdline | sed 's/.*user=\([^ ]*\).*/\1/'`
    1.29 @@ -104,6 +105,7 @@
    1.30  
    1.31  # Parse /proc/cmdline for boot options.
    1.32  echo "Parsing kernel cmdline for SliTaz live options... "
    1.33 +
    1.34  for opt in `cat /proc/cmdline`
    1.35  do
    1.36  	case $opt in
    1.37 @@ -136,10 +138,11 @@
    1.38  			status ;;
    1.39  		laptop)
    1.40  			# Laptop option to load ac and battery Kernel modules.
    1.41 -			echo "Loading laptop modules: ac, battery, yenta_socket..."
    1.42 -			modprobe ac
    1.43 -			modprobe battery
    1.44 -			modprobe yenta_socket ;;
    1.45 +			echo "Loading laptop modules: ac, battery, fan, yenta_socket..."
    1.46 +			for mod in ac battery fan yenta_socket
    1.47 +			do
    1.48 +				modprobe $mod
    1.49 +			done ;;
    1.50  		mount)
    1.51  			# Mount all ext3 partitions found (opt: mount).
    1.52  			# Get the list of partitions.