slitaz-boot-scripts diff etc/init.d/rcS @ rev 345

Start X later in boot process
author Christophe Lincoln <pankso@slitaz.org>
date Sat Feb 15 18:50:46 2014 +0100 (2014-02-15)
parents 89d0f484166f
children 6342e4d26e04
line diff
     1.1 --- a/etc/init.d/rcS	Fri Jan 31 19:09:01 2014 +0000
     1.2 +++ b/etc/init.d/rcS	Sat Feb 15 18:50:46 2014 +0100
     1.3 @@ -12,7 +12,6 @@
     1.4  # Set PATH, TZ and boot time.
     1.5  export PATH=/bin:/sbin:/usr/bin:/usr/sbin
     1.6  [ -s /etc/TZ ] && export TZ="$(cat /etc/TZ)"
     1.7 -[ -n "$bootdate" ] || bootdate=$(date +%s)
     1.8  
     1.9  case "$1" in
    1.10  
    1.11 @@ -90,11 +89,12 @@
    1.12  done
    1.13  status
    1.14  
    1.15 -# Clean up the system and set up tmp dirs.
    1.16 +# Clean up the system and set up tmp dirs */run/* are tmpfs so ther are 
    1.17 +# clean up at shutdown.
    1.18  if [ "$CLEAN_UP_SYSTEM" = "yes" ]; then
    1.19  	echo -n "Cleaning up the system..."
    1.20 -	rm -rf /tmp /var/run /run
    1.21 -	mkdir -p /tmp/.X11-unix /tmp/.ICE-unix /run/dbus /var/run
    1.22 +	rm -rf /tmp
    1.23 +	mkdir -p /tmp/.X11-unix /tmp/.ICE-unix
    1.24  	chmod -R 1777 /tmp
    1.25  	status
    1.26  else
    1.27 @@ -187,6 +187,14 @@
    1.28  	done
    1.29  fi
    1.30  
    1.31 +# Start X sesssion
    1.32 +if [ "$SCREEN" != "text" ] && [ "$LOGIN_MANAGER" ] && [ -x /etc/init.d/$LOGIN_MANAGER ]; then
    1.33 +	mkdir -p  /var/run/dbus
    1.34 +	/etc/init.d/dbus start
    1.35 +	colorize 36 "Starting X environment..."
    1.36 +	(sleep 2 && /etc/init.d/$LOGIN_MANAGER start >/dev/null) &
    1.37 +fi
    1.38 +
    1.39  # Back to a verbose mode
    1.40  (sleep 6 && echo "7 4 1 7" > /proc/sys/kernel/printk) &
    1.41  
    1.42 @@ -194,11 +202,6 @@
    1.43  	newline
    1.44  	colorize 32 "$MESSAGE"
    1.45  fi
    1.46 -
    1.47 -# Display and log boot time
    1.48 -time=$((`date +%s` - $bootdate))
    1.49 -echo $time > /var/log/boot-time
    1.50 -echo "SliTaz boot time: ${time}s"
    1.51  ;;
    1.52  
    1.53  *)