slitaz-boot-scripts rev 234
Let have a full graphical boot in option
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Fri Feb 25 01:21:05 2011 +0100 (2011-02-25) |
parents | 56c7da3f323e |
children | 06704c29c449 |
files | etc/init.d/rcS etc/rcS.conf |
line diff
1.1 --- a/etc/init.d/rcS Thu Feb 24 22:05:12 2011 +0100 1.2 +++ b/etc/init.d/rcS Fri Feb 25 01:21:05 2011 +0100 1.3 @@ -11,6 +11,15 @@ 1.4 # Boot time. 1.5 bootdate=`date +%s` 1.6 1.7 +# Graphical boot start. 1.8 +if [ "$FBSPLASH" == "yes" ]; then 1.9 + reset && fbsplash -c \ 1.10 + -s /etc/fbsplash/$FBSPLASH_THEME/fbsplash.ppm \ 1.11 + -i /etc/fbsplash/$FBSPLASH_THEME/fbsplash.cfg \ 1.12 + -f /etc/fbsplash/fifo & 1.13 + echo "0" > /etc/fbsplash/fifo 1.14 +fi 1.15 + 1.16 if [ "$1" != "logged" ]; then # logged 1.17 1.18 echo "Processing /etc/init.d/rcS..." 1.19 @@ -20,6 +29,8 @@ 1.20 /bin/mount proc 1.21 status 1.22 1.23 +[ "$FBSPLASH" == "yes" ] && echo "10" > /etc/fbsplash/fifo 1.24 + 1.25 # Parse cmdline args for earlier boot options. All other boot options 1.26 # are in /etc/init./bootopts.sh. 1.27 echo -n "Searching for early boot options..." 1.28 @@ -40,12 +51,14 @@ 1.29 done 1.30 status 1.31 1.32 +[ "$FBSPLASH" == "yes" ] && echo "20" > /etc/fbsplash/fifo 1.33 + 1.34 # Trigger Udev and handle hotplug events 1.35 if [ "$UDEV" = "yes" ]; then 1.36 echo -n "Udevadm requesting events from the Kernel..." 1.37 udevadm trigger 1.38 status 1.39 - echo -n "Using udev daemon for hotplugging..." 1.40 + echo -n "Using Udev for hotplugging..." 1.41 echo "/sbin/udevd" > /proc/sys/kernel/hotplug 1.42 status 1.43 fi 1.44 @@ -65,6 +78,8 @@ 1.45 echo "Remounting rootfs read/write..." 1.46 /bin/mount -o remount,rw / 1.47 1.48 +[ "$FBSPLASH" == "yes" ] && echo "30" > /etc/fbsplash/fifo 1.49 + 1.50 # Mount filesystems in /etc/fstab. 1.51 echo "Mounting filesystems in fstab..." 1.52 /bin/mount -a 1.53 @@ -89,6 +104,8 @@ 1.54 status 1.55 fi 1.56 1.57 +[ "$FBSPLASH" == "yes" ] && echo "40" > /etc/fbsplash/fifo 1.58 + 1.59 # Set up tmp X11 and ICE dir. 1.60 echo -n "Setting up tmp X11 and ICE unix dir..." 1.61 /bin/mkdir -p /tmp/.X11-unix /tmp/.ICE-unix 1.62 @@ -135,6 +152,8 @@ 1.63 status 1.64 fi 1.65 1.66 +[ "$FBSPLASH" == "yes" ] && echo "50" > /etc/fbsplash/fifo 1.67 + 1.68 # Handle kernel cmdline parameter modprobe=<module_list> 1.69 if [ -n "$MODPROBE" ]; then 1.70 MODULES=`sed -e 's/.* modprobe=\([^ ]*\).*/\1/' -e 's/,/\n/g' < /proc/cmdline` 1.71 @@ -177,6 +196,8 @@ 1.72 status 1.73 fi 1.74 1.75 +[ "$FBSPLASH" == "yes" ] && echo "60" > /etc/fbsplash/fifo 1.76 + 1.77 # Start syslogd and klogd. 1.78 if [ "$KERNEL_LOG_DAEMONS" = "yes" ]; then 1.79 echo -n "Starting system log deamon: syslogd..." 1.80 @@ -198,6 +219,8 @@ 1.81 # Be quiet on configuration to avoid messages overwriting ncurses dialog 1.82 echo "0 0 0 0" > /proc/sys/kernel/printk 1.83 1.84 +[ "$FBSPLASH" == "yes" ] && echo "70" > /etc/fbsplash/fifo 1.85 + 1.86 # Detect PCI and USB devices with Tazhw from slitaz-tools. We load 1.87 # kernel modules only at first boot or in LiveCD mode. 1.88 if [ ! -s /var/lib/detected-modules ]; then 1.89 @@ -221,6 +244,8 @@ 1.90 fi 1.91 done 1.92 1.93 +[ "$FBSPLASH" == "yes" ] && echo "80" > /etc/fbsplash/fifo 1.94 + 1.95 # Re-source main config file. In Live mode, daemons list can be modified 1.96 # by boot options (screen=text will remove slim). 1.97 . /etc/rcS.conf 1.98 @@ -234,6 +259,8 @@ 1.99 fi 1.100 done 1.101 1.102 +[ "$FBSPLASH" == "yes" ] && echo "90" > /etc/fbsplash/fifo 1.103 + 1.104 # Back to a verbose mode. 1.105 echo "7 4 1 7" > /proc/sys/kernel/printk 1.106 1.107 @@ -243,9 +270,12 @@ 1.108 echo -e "\033[1m$MESSAGE\033[0m" 1.109 fi 1.110 1.111 +[ "$FBSPLASH" == "yes" ] && echo "100" > /etc/fbsplash/fifo 1.112 + 1.113 # Display and log boot time. 1.114 time=$((`date +%s` - $bootdate)) 1.115 echo $time > /var/log/boot-time 1.116 echo "SliTaz boot time: ${time}s" 1.117 +[ "$FBSPLASH" == "yes" ] && echo "exit" > /etc/fbsplash/fifo 1.118 1.119 fi # logged
2.1 --- a/etc/rcS.conf Thu Feb 24 22:05:12 2011 +0100 2.2 +++ b/etc/rcS.conf Fri Feb 25 01:21:05 2011 +0100 2.3 @@ -18,6 +18,10 @@ 2.4 # then dbus, hald and slim can be removed from RUN_DAEMONS. 2.5 FAST_BOOT_X="no" 2.6 2.7 +# Graphical boot with fbsplash (To easily configure use: tazfbsplash) 2.8 +FBSPLASH="no" 2.9 +FBSPLASH_THEME="slitaz" 2.10 + 2.11 # Start Kernel log daemons (syslogd and klogd). 2.12 KERNEL_LOG_DAEMONS="yes" 2.13 SYSLOGD_ROTATED_SIZE="60"