slitaz-boot-scripts rev 359 5.5

Fix: starting Xorg (we dont need any config file)
author Christophe Lincoln <pankso@slitaz.org>
date Thu May 01 22:14:02 2014 +0200 (2014-05-01)
parents 1368d468177f
children 7655e966b263
files etc/init.d/bootopts.sh etc/init.d/rcS etc/init.d/system.sh
line diff
     1.1 --- a/etc/init.d/bootopts.sh	Fri Mar 28 15:00:11 2014 +0000
     1.2 +++ b/etc/init.d/bootopts.sh	Thu May 01 22:14:02 2014 +0200
     1.3 @@ -23,6 +23,7 @@
     1.4  # This option is not handled by a loop and case like others and has no
     1.5  # effect on an installed system.
     1.6  if ! grep -q "100[0-9]:100" /etc/passwd; then
     1.7 +
     1.8  	if fgrep -q "user=" /proc/cmdline; then
     1.9  		USER=$(cat /proc/cmdline | sed 's/.*user=\([^ ]*\).*/\1/')
    1.10  		# Avoid usage of an existing system user or root.
    1.11 @@ -32,19 +33,21 @@
    1.12  	else
    1.13  		USER=tux
    1.14  	fi
    1.15 +	
    1.16 +	# Make sure we have users applications.conf
    1.17 +	if [ ! -f "/etc/skel/.config/slitaz/applications.conf" ]; then
    1.18 +		mkdir -p /etc/skel/.config/slitaz
    1.19 +		cp /etc/slitaz/applications.conf /etc/skel/.config/slitaz
    1.20 +	fi
    1.21 +	
    1.22  	echo -n "Configuring user and group: $USER..."
    1.23  	adduser -D -s /bin/sh -g "SliTaz User" -G users -h /home/$USER $USER
    1.24  	passwd -d $USER >/dev/null
    1.25  	status
    1.26 -	# Audio and cdrom group.
    1.27 -	addgroup $USER audio
    1.28 -	addgroup $USER cdrom
    1.29 -	addgroup $USER video
    1.30 -	addgroup $USER tty
    1.31 -	# Slim default user.
    1.32 +	
    1.33 +	# Slim default user
    1.34  	if [ -f /etc/slim.conf ]; then
    1.35 -		sed -i s/"default_user .*"/"default_user        $USER"/\
    1.36 -			/etc/slim.conf
    1.37 +		sed -i s/"default_user .*"/"default_user    $USER"/ /etc/slim.conf
    1.38  	fi
    1.39  fi
    1.40  
    1.41 @@ -180,8 +183,3 @@
    1.42  			continue ;;
    1.43  	esac
    1.44  done
    1.45 -
    1.46 -# If no default WM fallback to Openbox (we never know).
    1.47 -if [ ! -f /etc/X11/wm.default ]; then
    1.48 -	echo "openbox" > /etc/X11/wm.default
    1.49 -fi
     2.1 --- a/etc/init.d/rcS	Fri Mar 28 15:00:11 2014 +0000
     2.2 +++ b/etc/init.d/rcS	Thu May 01 22:14:02 2014 +0200
     2.3 @@ -178,6 +178,18 @@
     2.4  	/etc/init.d/$script
     2.5  done
     2.6  
     2.7 +# Start X session
     2.8 +if [ "$SCREEN" != "text" ] && [ "$LOGIN_MANAGER" ] && [ -x "/etc/init.d/$LOGIN_MANAGER" ]; then
     2.9 +	colorize 36 "Starting X environment..."
    2.10 +	# We need Xorg 40-Keyboard.conf and SliTaz applications.conf
    2.11 +	if [ ! -s "/etc/X11/xorg.conf.d/40-Keyboard.conf" ]; then
    2.12 +		echo "Configuring Xorg server..." && HOME="/root" 
    2.13 +		tazx init
    2.14 +	fi
    2.15 +	#/etc/init.d/dbus start
    2.16 +	(sleep 2; /etc/init.d/${LOGIN_MANAGER} start >/dev/null) &
    2.17 +fi
    2.18 +
    2.19  # Start all daemons specified with $RUN_DAEMONS
    2.20  if [ "$RUN_DAEMONS" ]; then
    2.21  	colorize 33 "Starting all daemons..."
    2.22 @@ -186,14 +198,6 @@
    2.23  	done
    2.24  fi
    2.25  
    2.26 -# Start X session
    2.27 -if [ "$SCREEN" != "text" ] && [ "$LOGIN_MANAGER" ] && [ -x /etc/init.d/$LOGIN_MANAGER ]; then
    2.28 -	mkdir -p  /var/run/dbus
    2.29 -	/etc/init.d/dbus start
    2.30 -	colorize 36 "Starting X environment..."
    2.31 -	(sleep 2 && /etc/init.d/$LOGIN_MANAGER start >/dev/null) &
    2.32 -fi
    2.33 -
    2.34  # Back to a verbose mode
    2.35  (sleep 6 && echo "7 4 1 7" > /proc/sys/kernel/printk) &
    2.36  
     3.1 --- a/etc/init.d/system.sh	Fri Mar 28 15:00:11 2014 +0000
     3.2 +++ b/etc/init.d/system.sh	Thu May 01 22:14:02 2014 +0200
     3.3 @@ -114,13 +114,5 @@
     3.4  	swapon -a && status
     3.5  fi
     3.6  
     3.7 -# Xorg auto configuration: $HOME is not yet set. We config even if
     3.8 -# screen=text so X can be started by users via 'startx'
     3.9 -if [ ! -s /etc/X11/xorg.conf ] && [ -x /usr/bin/Xorg ]; then
    3.10 -	echo "Configuring Xorg..."
    3.11 -	HOME=/root
    3.12 -	tazx config-xorg 2>/var/log/xorg.configure.log
    3.13 -fi
    3.14 -
    3.15  # Start TazPanel
    3.16  [ -x /usr/bin/tazpanel ] && tazpanel start