# HG changeset patch # User Christophe Lincoln # Date 1299715976 -3600 # Node ID f73b5174f536c6ab8000ac21195c48d0d62a1fa3 # Parent 6a5dca101eaa52575c884b2a6a9fee9f79e6a03f Reenable udevd (after everything is mounted), improve graphical boot with fbsplash diff -r 6a5dca101eaa -r f73b5174f536 etc/init.d/rcS --- a/etc/init.d/rcS Tue Mar 08 23:12:29 2011 +0100 +++ b/etc/init.d/rcS Thu Mar 10 01:12:56 2011 +0100 @@ -11,17 +11,17 @@ # Boot time. bootdate=`date +%s` +if [ "$1" != "logged" ]; then # logged + # Graphical boot start. if [ "$FBSPLASH" == "yes" ]; then reset && fbsplash -c \ -s /etc/fbsplash/$FBSPLASH_THEME/fbsplash.ppm \ -i /etc/fbsplash/$FBSPLASH_THEME/fbsplash.cfg \ -f /etc/fbsplash/fifo & - echo "0" > /etc/fbsplash/fifo + echo "0" > /etc/fbsplash/fifo && sleep 1 fi -if [ "$1" != "logged" ]; then # logged - echo "Processing /etc/init.d/rcS..." # Mount /proc. @@ -53,16 +53,6 @@ [ "$FBSPLASH" == "yes" ] && echo "20" > /etc/fbsplash/fifo -# Trigger Udev and handle hotplug events -if [ "$UDEV" = "yes" ]; then - echo -n "Udevadm requesting events from the Kernel..." - udevadm trigger - status - echo -n "Using Udev for hotplugging..." - echo "/sbin/udevd" > /proc/sys/kernel/hotplug - status -fi - # Before mounting filesystems we check fs specified in the file # /etc/rcS.conf and variable $CHECK_FS. if [ -n "$CHECK_FS" ]; then @@ -78,6 +68,22 @@ echo "Remounting rootfs read/write..." /bin/mount -o remount,rw / +# Trigger Udev and handle hotplug events +if [ "$UDEV" = "yes" ]; then + echo -n "Starting udev daemon..." + /sbin/udevd --daemon + status + echo -n "Udevadm requesting events from the Kernel..." + udevadm trigger + status + echo -n "Udevadm waiting for the event queue to finish..." + udevadm settle + status + echo -n "Using Udev for hotplugging..." + echo "/sbin/udevd" > /proc/sys/kernel/hotplug + status +fi + [ "$FBSPLASH" == "yes" ] && echo "30" > /etc/fbsplash/fifo # Mount filesystems in /etc/fstab. @@ -227,13 +233,7 @@ /sbin/tazhw init fi -# Call udevadm trigger to ensure /dev is fully populate now that all -# modules are loaded. -if [ "$UDEV" = "yes" ]; then - echo -n "Requesting events from the Kernel..." - udevadm trigger - status -fi +[ "$FBSPLASH" == "yes" ] && echo "80" > /etc/fbsplash/fifo # Start all scripts specified with $RUN_SCRIPTS. echo "Executing all initialization scripts..." @@ -244,7 +244,7 @@ fi done -[ "$FBSPLASH" == "yes" ] && echo "80" > /etc/fbsplash/fifo +[ "$FBSPLASH" == "yes" ] && echo "90" > /etc/fbsplash/fifo # Re-source main config file. In Live mode, daemons list can be modified # by boot options (screen=text will remove slim). @@ -259,7 +259,7 @@ fi done -[ "$FBSPLASH" == "yes" ] && echo "90" > /etc/fbsplash/fifo +[ "$FBSPLASH" == "yes" ] && echo "100" > /etc/fbsplash/fifo # Back to a verbose mode. echo "7 4 1 7" > /proc/sys/kernel/printk @@ -270,12 +270,11 @@ echo -e "\033[1m$MESSAGE\033[0m" fi -[ "$FBSPLASH" == "yes" ] && echo "100" > /etc/fbsplash/fifo - # Display and log boot time. time=$((`date +%s` - $bootdate)) echo $time > /var/log/boot-time echo "SliTaz boot time: ${time}s" + [ "$FBSPLASH" == "yes" ] && echo "exit" > /etc/fbsplash/fifo fi # logged