slitaz-boot-scripts rev 244 4.1.2

Rollback rev 238 to release 4.1.2: it screw usb plug (mouse doesn't works into X)
author Antoine Bodin <gokhlayeh@slitaz.org>
date Sun Mar 27 01:46:32 2011 +0100 (2011-03-27)
parents 3a7340a21012
children 8e9696298282
files etc/init.d/rcS
line diff
     1.1 --- a/etc/init.d/rcS	Sat Mar 26 19:31:19 2011 +0100
     1.2 +++ b/etc/init.d/rcS	Sun Mar 27 01:46:32 2011 +0100
     1.3 @@ -11,17 +11,17 @@
     1.4  # Boot time.
     1.5  bootdate=`date +%s`
     1.6  
     1.7 -if [ "$1" != "logged" ]; then # logged
     1.8 -
     1.9  # Graphical boot start.
    1.10  if [ "$FBSPLASH" == "yes" ]; then
    1.11  	reset && fbsplash -c \
    1.12  		-s /etc/fbsplash/$FBSPLASH_THEME/fbsplash.ppm \
    1.13  		-i /etc/fbsplash/$FBSPLASH_THEME/fbsplash.cfg \
    1.14  		-f /etc/fbsplash/fifo &
    1.15 -	echo "0" > /etc/fbsplash/fifo && sleep 1
    1.16 +	echo "0" > /etc/fbsplash/fifo
    1.17  fi
    1.18  
    1.19 +if [ "$1" != "logged" ]; then # logged
    1.20 +
    1.21  echo "Processing /etc/init.d/rcS..."
    1.22  
    1.23  # Mount /proc.
    1.24 @@ -53,6 +53,16 @@
    1.25  
    1.26  [ "$FBSPLASH" == "yes" ] && echo "20" > /etc/fbsplash/fifo
    1.27  
    1.28 +# Trigger Udev and handle hotplug events
    1.29 +if [ "$UDEV" = "yes" ]; then
    1.30 +	echo -n "Udevadm requesting events from the Kernel..."
    1.31 +	udevadm trigger
    1.32 +	status
    1.33 +	echo -n "Using Udev for hotplugging..."
    1.34 +	echo "/sbin/udevd" > /proc/sys/kernel/hotplug
    1.35 +	status
    1.36 +fi
    1.37 +
    1.38  # Before mounting filesystems we check fs specified in the file
    1.39  # /etc/rcS.conf and variable $CHECK_FS.
    1.40  if [ -n "$CHECK_FS" ]; then
    1.41 @@ -68,22 +78,6 @@
    1.42  echo "Remounting rootfs read/write..."
    1.43  /bin/mount -o remount,rw /
    1.44  
    1.45 -# Trigger Udev and handle hotplug events
    1.46 -if [ "$UDEV" = "yes" ]; then
    1.47 -	echo -n "Starting udev daemon..."
    1.48 -	/sbin/udevd --daemon
    1.49 -	status
    1.50 -	echo -n "Udevadm requesting events from the Kernel..."
    1.51 -	udevadm trigger
    1.52 -	status
    1.53 -	echo -n "Udevadm waiting for the event queue to finish..."
    1.54 -	udevadm settle
    1.55 -	status
    1.56 -	echo -n "Using Udev for hotplugging..."
    1.57 -	echo "/sbin/udevd" > /proc/sys/kernel/hotplug
    1.58 -	status
    1.59 -fi
    1.60 -
    1.61  [ "$FBSPLASH" == "yes" ] && echo "30" > /etc/fbsplash/fifo
    1.62  
    1.63  # Mount filesystems in /etc/fstab.
    1.64 @@ -233,7 +227,13 @@
    1.65  	/sbin/tazhw init
    1.66  fi
    1.67  
    1.68 -[ "$FBSPLASH" == "yes" ] && echo "80" > /etc/fbsplash/fifo
    1.69 +# Call udevadm trigger to ensure /dev is fully populate now that all 
    1.70 +# modules are loaded.
    1.71 +if [ "$UDEV" = "yes" ]; then
    1.72 +	echo -n "Requesting events from the Kernel..."
    1.73 +	udevadm trigger
    1.74 +	status
    1.75 +fi
    1.76  
    1.77  # Start all scripts specified with $RUN_SCRIPTS.
    1.78  echo "Executing all initialization scripts..."
    1.79 @@ -244,7 +244,7 @@
    1.80  	fi
    1.81  done
    1.82  
    1.83 -[ "$FBSPLASH" == "yes" ] && echo "90" > /etc/fbsplash/fifo
    1.84 +[ "$FBSPLASH" == "yes" ] && echo "80" > /etc/fbsplash/fifo
    1.85  
    1.86  # Re-source main config file. In Live mode, daemons list can be modified
    1.87  # by boot options (screen=text will remove slim).
    1.88 @@ -259,7 +259,7 @@
    1.89  	fi
    1.90  done
    1.91  
    1.92 -[ "$FBSPLASH" == "yes" ] && echo "100" > /etc/fbsplash/fifo
    1.93 +[ "$FBSPLASH" == "yes" ] && echo "90" > /etc/fbsplash/fifo
    1.94  
    1.95  # Back to a verbose mode.
    1.96  echo "7 4 1 7" > /proc/sys/kernel/printk
    1.97 @@ -270,11 +270,12 @@
    1.98  	echo -e "\033[1m$MESSAGE\033[0m"
    1.99  fi
   1.100  
   1.101 +[ "$FBSPLASH" == "yes" ] && echo "100" > /etc/fbsplash/fifo
   1.102 +
   1.103  # Display and log boot time.
   1.104  time=$((`date +%s` - $bootdate))
   1.105  echo $time > /var/log/boot-time
   1.106  echo "SliTaz boot time: ${time}s"
   1.107 -
   1.108  [ "$FBSPLASH" == "yes" ] && echo "exit" > /etc/fbsplash/fifo
   1.109  
   1.110  fi # logged