slitaz-tools rev 876 5.8.5

Fix tazx (we have no X session on rc1...
author Christophe Lincoln <pankso@slitaz.org>
date Thu May 01 22:10:37 2014 +0200 (2014-05-01)
parents c02fa4aa50ec
children 4703e023af57
files tinyutils/tazx
line diff
     1.1 --- a/tinyutils/tazx	Thu May 01 09:58:16 2014 +0200
     1.2 +++ b/tinyutils/tazx	Thu May 01 22:10:37 2014 +0200
     1.3 @@ -202,20 +202,21 @@
     1.4  }
     1.5  
     1.6  # ~/.config/slitaz/applications.conf: Missing = failed to login
     1.7 +# Make users applications.conf in /etc/skel so new added user will get
     1.8 +# a working X session. Note --> flavors can have a custom config in
     1.9 +# /etc/slitaz/applications that we must use.
    1.10  slitaz_apps_conf() {
    1.11  	apps_conf=/etc/slitaz/applications.conf
    1.12 -	user_conf="$HOME/.config/slitaz/applications.conf"
    1.13 -
    1.14 -	# Make users applications.conf in /etc/skel so new added user will get
    1.15 -	# a working X session. It is gen now --> flavors can have a custom one
    1.16 -	if test $(id -u) = 0; then
    1.17 -		conf="/etc/skel/.config/slitaz/applications.conf"
    1.18 -		mkdir -p $(dirname $user_conf); cp -f ${apps_conf} ${conf}
    1.19 -	fi
    1.20  	
    1.21 -	# If started by: startx and with boot opts screen=text
    1.22 -	if [ ! -f "$user_conf" ]; then
    1.23 -		mkdir -p $(dirname $user_conf); cp ${apps_conf} ${user_conf}
    1.24 +	if [ "$(id -u)" = 0 ]; then
    1.25 +		user_conf="/etc/skel/.config/slitaz/applications.conf"
    1.26 +		mkdir -p $(dirname $user_conf); cp -f ${apps_conf} ${user_conf}
    1.27 +	else
    1.28 +		# If started by: startx and with boot opts screen=text
    1.29 +		user_conf="$HOME/.config/slitaz/applications.conf"
    1.30 +		if [ ! -f "$user_conf" ]; then
    1.31 +			mkdir -p $(dirname $user_conf); cp ${apps_conf} ${user_conf}
    1.32 +		fi
    1.33  	fi
    1.34  }
    1.35