# HG changeset patch # User Christophe Lincoln # Date 1240747828 -7200 # Node ID 3ff9c51793312c7ba0463d795ffd2b865d5d75e0 # Parent 3f862c04d344bd450754157233808deb9aef221c Add option FAST_BOOT_X (fastbootx) to start X 4-6 sec earlier diff -r 3f862c04d344 -r 3ff9c5179331 etc/init.d/rcS --- a/etc/init.d/rcS Sun Apr 26 01:14:33 2009 +0200 +++ b/etc/init.d/rcS Sun Apr 26 14:10:28 2009 +0200 @@ -50,17 +50,49 @@ echo "Mounting filesystems in fstab... " /bin/mount -a -/bin/dmesg > /var/log/dmesg.log +# Store boot messages to log files. +/bin/dmesg > /var/log/dmesg.log & vcsa2txt < /dev/vcsa1 | awk 'BEGIN {s=0} /^Processing|^.witching/ {s=1} { if (s) print }' >/var/log/boot.log script -a -q -c '/etc/init.d/rcS logged' /var/log/boot.log else # logged +# Clean up the system. +if [ "$CLEAN_UP_SYSTEM" = "yes" ]; then + echo -n "Cleaning up the system... " + /bin/rm -rf /tmp /var/run/*.pid /var/run/dbus/* \ + /var/run/hald/pid /var/lock/* + /bin/mkdir -p /tmp && /bin/chmod 1777 /tmp + status +else + echo "System clean up is disabled in /etc/rcS.conf... " + echo -n "Keeping all tmp and pid files... " + status +fi + +# Set up tmp X11 and ICE dir. +echo -n "Setting up tmp X11 and ICE unix dir... " +/bin/mkdir -p /tmp/.X11-unix /tmp/.ICE-unix +/bin/chmod 1777 /tmp/.X11-unix /tmp/.ICE-unix +status + +# Fast boot into X for HD install or custom Live system. We need +# keymap settings since Xvesa dump the console mapping and a correct +# slim configuration for screen resolution. DBUS and HAL must also start +# befor X session (manual login or autologin) to have devices in PCmanFM. +if [ "$FAST_BOOT_X" = "yes" ] || grep -q -w "fastbootx" /proc/cmdline; then + /etc/init.d/i18n.sh + /etc/init.d/dbus start + /etc/init.d/hald start + /etc/init.d/slim start & +fi + # Create /dev/cdrom if needed (symlink does not exist on LiveCD). # Also add /dev/cdrom to fstab if entry does not exist. -DRIVE_NAME=`cat /proc/sys/dev/cdrom/info | grep "drive name" | cut -f 3` if grep -q " cdrom=" /proc/cmdline; then DRIVE_NAME=`cat /proc/cmdline | sed 's/.* cdrom=\([^ ]*\).*/\1/'` +else + DRIVE_NAME=`cat /proc/sys/dev/cdrom/info | grep "drive name" | cut -f 3` fi if [ -n "$DRIVE_NAME" -a ! "`readlink /dev/cdrom`" ]; then echo -n "Creating symlink : /dev/cdrom..." @@ -137,25 +169,6 @@ echo "Kernel log daemons are disabled in /etc/rc.conf... " fi -# Clean up the system. -if [ "$CLEAN_UP_SYSTEM" = "yes" ]; then - echo -n "Cleaning up the system... " - /bin/rm -rf /tmp /var/run/*.pid /var/run/dbus/* \ - /var/run/hald/pid /var/lock/* - /bin/mkdir -p /tmp && /bin/chmod 1777 /tmp - status -else - echo "System clean up is disabled in /etc/rcS.conf... " - echo -n "Keeping all tmp and pid files... " - status -fi - -# Set up tmp X11 and ICE dir. -echo -n "Setting up tmp X11 and ICE unix dir... " -/bin/mkdir -p /tmp/.X11-unix /tmp/.ICE-unix -/bin/chmod 1777 /tmp/.X11-unix /tmp/.ICE-unix -status - # Load all modules listed in config file. if [ -n "$LOAD_MODULES" ]; then for mod in $LOAD_MODULES @@ -204,4 +217,4 @@ echo -e "\033[1m$MESSAGE\033[0m" fi -fi #logged +fi # logged diff -r 3f862c04d344 -r 3ff9c5179331 etc/rcS.conf --- a/etc/rcS.conf Sun Apr 26 01:14:33 2009 +0200 +++ b/etc/rcS.conf Sun Apr 26 14:10:28 2009 +0200 @@ -2,10 +2,6 @@ # Config file used by /etc/init.d/rcS # -# Start Kernel log daemons (syslogd and klogd). -KERNEL_LOG_DAEMONS="yes" -SYSLOGD_ROTATED_SIZE="60" - # Use udev to populate /dev and handles hotplug events. UDEV="yes" @@ -17,6 +13,15 @@ # /etc/fstab. Example : CHECK_FS="/dev/hda5 /dev/hdb1" CHECK_FS="" +# Fast boot into X by setting the system keymap-locale and starting +# the Slim login manager earlier at boot time. If fast X is enabled +# then dbus, hald and slim can be removed from RUN_DAEMONS. +FAST_BOOT_X="no" + +# Start Kernel log daemons (syslogd and klogd). +KERNEL_LOG_DAEMONS="yes" +SYSLOGD_ROTATED_SIZE="60" + # Kernel modules to automatically load at boot time. You can use 'modprobe -l' # to get a list of all kernel modules available. # @@ -29,13 +34,12 @@ # need an active connexion to install Xorg) then you are free to choose. # Note that the local.sh script exists to let you quickly add some local startup # commands. -RUN_SCRIPTS="bootopts.sh i18n.sh network.sh hwconf.sh local.sh" +RUN_SCRIPTS="bootopts.sh network.sh i18n.sh hwconf.sh local.sh" # Daemons to start at boot time. SliTaz only provides a few daemons: firewall, # Web server (lighttpd), SSH server (dropbear) and rsyncd, so boot order is # not really important, but dbus/hald should be started before slim. -RUN_DAEMONS="dbus hald firewall lighttpd slim" +RUN_DAEMONS="dbus hald firewall slim" # Pre login bold message. MESSAGE="Welcome to your box." -