slitaz-tools rev 874 5.8.4
Fixes for tazx and slitaz-config (correctly copy applications.conf to user config dir)
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Thu May 01 09:57:49 2014 +0200 (2014-05-01) |
parents | aa153d70ece3 |
children | c02fa4aa50ec |
files | tinyutils/slitaz-config tinyutils/tazx |
line diff
1.1 --- a/tinyutils/slitaz-config Thu May 01 08:41:32 2014 +0200 1.2 +++ b/tinyutils/slitaz-config Thu May 01 09:57:49 2014 +0200 1.3 @@ -54,10 +54,17 @@ 1.4 [ "$passwd" == "" ] && return 0 1.5 adduser -D -g "SliTaz User" -G users ${user} 1.6 echo "$user:$passwd" | chpasswd --md5 >/dev/null 1.7 + 1.8 # User groups 1.9 for group in audio cdrom video tty; do 1.10 - addgroup ${user} ${group} 1.11 + addgroup ${user} ${group} >/dev/null 1.12 done 1.13 + 1.14 + # Make sure system-wide applications.conf is used 1.15 + config="/home/${user}/.config" 1.16 + mkdir -p ${config}/slitaz 1.17 + cp -f /etc/slitaz/applications.conf ${config}/slitaz 1.18 + 1.19 # Slim default user on post-install 1.20 if [ -f "/etc/slim.conf" ] && [ ! -f "/var/lib/slitaz/post-install" ]; then 1.21 sed -i s"/default_user .*/default_user $user/" /etc/slim.conf 1.22 @@ -189,10 +196,6 @@ 1.23 echo -e "\nUnable to connect..." 1.24 fi 1.25 echo "XXX" && sleep 2 1.26 - # Network will be restarted on first boot 1.27 - if [ ! "/var/lib/slitaz/post-install" ]; then 1.28 - stopd network.sh 1.29 - fi 1.30 1.31 } | dialog --title "{ Wi-Fi Config }" --gauge "" 8 ${width} 0 1.32 }
2.1 --- a/tinyutils/tazx Thu May 01 08:41:32 2014 +0200 2.2 +++ b/tinyutils/tazx Thu May 01 09:57:49 2014 +0200 2.3 @@ -56,11 +56,13 @@ 2.4 keyboard_conf() { 2.5 # Configure the keyboard with the right keymap. 2.6 keymap=$(cat /etc/keymap.conf) 2.7 - keyboard_config=$xorg_config/40-Keyboard.conf 2.8 + keyboard_config="/etc/X11/xorg.conf.d/40-Keyboard.conf" 2.9 variant="" 2.10 # this XkbOption moved from 40-evdev.conf (xorg-xf86-input-evdev) 2.11 options="terminate:ctrl_alt_bksp" 2.12 - case $keymap in 2.13 + gettext "Creating:"; echo -n " $keyboard_config" 2.14 + mkdir -p $(dirname $keyboard_config) 2.15 + case "$keymap" in 2.16 fr_CH-latin1) 2.17 # Swiss FrenCH 2.18 layout="ch"; variant="fr" ;; 2.19 @@ -87,7 +89,6 @@ 2.20 keymap=${keymap%-lat6} 2.21 layout=${keymap%-abnt2} 2.22 esac 2.23 - 2.24 cat > $keyboard_config << EOC 2.25 Section "InputClass" 2.26 Identifier "Keyboard Defaults" 2.27 @@ -97,7 +98,8 @@ 2.28 Option "XkbOptions" "$options" 2.29 EndSection 2.30 EOC 2.31 - [ x$variant == x ] && sed -i '/XkbVariant/d' $keyboard_config 2.32 + status 2.33 + [ x$variant == x ] && sed -i '/XkbVariant/d' ${keyboard_config} 2.34 } 2.35 2.36 # Populate xorg.conf.d. 2.37 @@ -205,10 +207,10 @@ 2.38 user_conf="$HOME/.config/slitaz/applications.conf" 2.39 2.40 # Make users applications.conf in /etc/skel so new added user will get 2.41 - # a working X session. 2.42 + # a working X session. It is gen now --> flavors can have a custom one 2.43 if test $(id -u) = 0; then 2.44 - user_conf="/etc/skel/.config/slitaz/applications.conf" 2.45 - mkdir -p $(dirname $user_conf); cp -f ${apps_conf} ${user_conf} 2.46 + conf="/etc/skel/.config/slitaz/applications.conf" 2.47 + mkdir -p $(dirname $user_conf); cp -f ${apps_conf} ${conf} 2.48 fi 2.49 2.50 # If started by: startx and with boot opts screen=text 2.51 @@ -237,14 +239,14 @@ 2.52 fi ;; 2.53 2.54 init) 2.55 - # We don't need much config files with last Xorg version, So just 2.56 - # get files for starting an X session and config the keyboard. 2.57 + # We dont need much config files with last Xorg verrsion, So just 2.58 + # gest files for start a X session and config the keyboard. 2.59 check_root 2.60 slitaz_apps_conf 2.61 keyboard_conf 2.62 gen_xorg_conf_file ;; 2.63 2.64 - keyboard) 2.65 + keybard) 2.66 echo "Generating: 40-Keyboard.conf" 2.67 keyboard_conf ;; 2.68