slitaz-boot-scripts 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 b2ca17642fab
files etc/init.d/network.sh etc/init.d/rcS etc/init.d/system.sh
line diff
     1.1 --- a/etc/init.d/network.sh	Fri Jan 31 19:09:01 2014 +0000
     1.2 +++ b/etc/init.d/network.sh	Sat Feb 15 18:50:46 2014 +0100
     1.3 @@ -136,7 +136,7 @@
     1.4  				wpa_supplicant -B -W -c/tmp/wpa.conf \
     1.5  					-D$WPA_DRIVER -i$WIFI_INTERFACE ;;
     1.6  		esac
     1.7 -		rm -f /tmp/wpa.conf
     1.8 +		#rm -f /tmp/wpa.conf
     1.9  		INTERFACE=$WIFI_INTERFACE
    1.10  	fi
    1.11  }
     2.1 --- a/etc/init.d/rcS	Fri Jan 31 19:09:01 2014 +0000
     2.2 +++ b/etc/init.d/rcS	Sat Feb 15 18:50:46 2014 +0100
     2.3 @@ -12,7 +12,6 @@
     2.4  # Set PATH, TZ and boot time.
     2.5  export PATH=/bin:/sbin:/usr/bin:/usr/sbin
     2.6  [ -s /etc/TZ ] && export TZ="$(cat /etc/TZ)"
     2.7 -[ -n "$bootdate" ] || bootdate=$(date +%s)
     2.8  
     2.9  case "$1" in
    2.10  
    2.11 @@ -90,11 +89,12 @@
    2.12  done
    2.13  status
    2.14  
    2.15 -# Clean up the system and set up tmp dirs.
    2.16 +# Clean up the system and set up tmp dirs */run/* are tmpfs so ther are 
    2.17 +# clean up at shutdown.
    2.18  if [ "$CLEAN_UP_SYSTEM" = "yes" ]; then
    2.19  	echo -n "Cleaning up the system..."
    2.20 -	rm -rf /tmp /var/run /run
    2.21 -	mkdir -p /tmp/.X11-unix /tmp/.ICE-unix /run/dbus /var/run
    2.22 +	rm -rf /tmp
    2.23 +	mkdir -p /tmp/.X11-unix /tmp/.ICE-unix
    2.24  	chmod -R 1777 /tmp
    2.25  	status
    2.26  else
    2.27 @@ -187,6 +187,14 @@
    2.28  	done
    2.29  fi
    2.30  
    2.31 +# Start X sesssion
    2.32 +if [ "$SCREEN" != "text" ] && [ "$LOGIN_MANAGER" ] && [ -x /etc/init.d/$LOGIN_MANAGER ]; then
    2.33 +	mkdir -p  /var/run/dbus
    2.34 +	/etc/init.d/dbus start
    2.35 +	colorize 36 "Starting X environment..."
    2.36 +	(sleep 2 && /etc/init.d/$LOGIN_MANAGER start >/dev/null) &
    2.37 +fi
    2.38 +
    2.39  # Back to a verbose mode
    2.40  (sleep 6 && echo "7 4 1 7" > /proc/sys/kernel/printk) &
    2.41  
    2.42 @@ -194,11 +202,6 @@
    2.43  	newline
    2.44  	colorize 32 "$MESSAGE"
    2.45  fi
    2.46 -
    2.47 -# Display and log boot time
    2.48 -time=$((`date +%s` - $bootdate))
    2.49 -echo $time > /var/log/boot-time
    2.50 -echo "SliTaz boot time: ${time}s"
    2.51  ;;
    2.52  
    2.53  *)
     3.1 --- a/etc/init.d/system.sh	Fri Jan 31 19:09:01 2014 +0000
     3.2 +++ b/etc/init.d/system.sh	Sat Feb 15 18:50:46 2014 +0100
     3.3 @@ -127,16 +127,5 @@
     3.4  	tazx config-xorg 2>/var/log/xorg.configure.log
     3.5  fi
     3.6  
     3.7 -# Start X sesssion as soon as possible
     3.8 -if [ "$SCREEN" != "text" ] && [ "$LOGIN_MANAGER" ] && [ -x /etc/init.d/$LOGIN_MANAGER ]; then
     3.9 -	echo -n "Starting X environment..."
    3.10 -	/etc/init.d/dbus start >/dev/null
    3.11 -	if [ $(/bin/hostname) == '(none)' ];then
    3.12 -		/bin/hostname -F /etc/hostname
    3.13 -	fi
    3.14 -	/etc/init.d/$LOGIN_MANAGER start >/dev/null &
    3.15 -	status
    3.16 -fi
    3.17 -
    3.18  # Start TazPanel
    3.19  [ -x /usr/bin/tazpanel ] && tazpanel start