slitaz-boot-scripts diff etc/init.d/system.sh @ rev 413
remove some error message in base
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Thu Aug 27 21:19:17 2015 +0200 (2015-08-27) |
parents | 19cbb42ff322 |
children | 29ec74a6d359 |
line diff
1.1 --- a/etc/init.d/system.sh Sat Feb 07 15:49:16 2015 -0500 1.2 +++ b/etc/init.d/system.sh Thu Aug 27 21:19:17 2015 +0200 1.3 @@ -10,13 +10,11 @@ 1.4 . /etc/rcS.conf 1.5 1.6 # Parse cmdline args for boot options (See also rcS and bootopts.sh). 1.7 -XARG="" 1.8 -for opt in $(cat /proc/cmdline) 1.9 -do 1.10 +XARG='' 1.11 +for opt in $(cat /proc/cmdline); do 1.12 case $opt in 1.13 console=*) 1.14 - sed -i "s/tty1/${opt#console=}/g;/^tty[2-9]::/d" \ 1.15 - /etc/inittab ;; 1.16 + sed -i "s/tty1/${opt#console=}/g;/^tty[2-9]::/d" /etc/inittab ;; 1.17 sound=*) 1.18 DRIVER=${opt#sound=} ;; 1.19 xarg=*) 1.20 @@ -27,9 +25,9 @@ 1.21 done 1.22 1.23 # Locale config 1.24 -if [ ! -s "/etc/locale.conf" ]; then 1.25 - echo "Setting system locale to: POSIX (English)" 1.26 - echo -e "LANG=POSIX\nLC_ALL=POSIX" > /etc/locale.conf 1.27 +if [ ! -s '/etc/locale.conf' ]; then 1.28 + echo 'Setting system locale to: POSIX (English)' 1.29 + echo -e 'LANG=POSIX\nLC_ALL=POSIX' > /etc/locale.conf 1.30 fi 1.31 . /etc/locale.conf 1.32 echo -n "Setting system locale: $LANG" 1.33 @@ -37,9 +35,9 @@ 1.34 . /lib/libtaz.sh && status 1.35 1.36 # Keymap config: Default to us in live mode if kmap= was not used. 1.37 -if [ ! -s "/etc/keymap.conf" ]; then 1.38 - echo "Setting system keymap to: us (USA)" 1.39 - echo "us" > /etc/keymap.conf 1.40 +if [ ! -s '/etc/keymap.conf' ]; then 1.41 + echo 'Setting system keymap to: us (USA)' 1.42 + echo 'us' > /etc/keymap.conf 1.43 fi 1.44 kmap=$(cat /etc/keymap.conf) 1.45 echo -n "Loading console keymap: $kmap" 1.46 @@ -48,14 +46,14 @@ 1.47 1.48 # Timezone config: Set timezone using the keymap config for fr, be, fr_CH 1.49 # and ca with Montreal. 1.50 -if [ ! -s "/etc/TZ" ]; then 1.51 +if [ ! -s '/etc/TZ' ]; then 1.52 case "$kmap" in 1.53 fr-latin1|be-latin1) 1.54 - echo "Europe/Paris" > /etc/TZ ;; 1.55 + echo 'Europe/Paris' > /etc/TZ ;; 1.56 fr_CH-latin1|de_CH-latin1) 1.57 - echo "Europe/Zurich" > /etc/TZ ;; 1.58 - cf) echo "America/Montreal" > /etc/TZ ;; 1.59 - *) echo "UTC" > /etc/TZ ;; 1.60 + echo 'Europe/Zurich' > /etc/TZ ;; 1.61 + cf) echo 'America/Montreal' > /etc/TZ ;; 1.62 + *) echo 'UTC' > /etc/TZ ;; 1.63 esac 1.64 fi 1.65 1.66 @@ -71,7 +69,7 @@ 1.67 done 1.68 fi 1.69 if grep -q swap /etc/fstab; then 1.70 - echo -n "Activating swap memory..." 1.71 + echo -n 'Activating swap memory...' 1.72 swapon -a && status 1.73 fi 1.74 1.75 @@ -86,10 +84,10 @@ 1.76 if [ -n "$DRIVER" ]; then 1.77 case "$DRIVER" in 1.78 no) 1.79 - echo -n "Removing all sound kernel modules..." 1.80 + echo -n 'Removing all sound kernel modules...' 1.81 rm -rf /lib/modules/$(uname -r)/kernel/sound 1.82 status 1.83 - echo -n "Removing all sound packages..." 1.84 + echo -n 'Removing all sound packages...' 1.85 for i in $(grep -l '^DEPENDS=.*alsa-lib' /var/lib/tazpkg/installed/*/receipt) ; do 1.86 pkg=${i#/var/lib/tazpkg/installed/} 1.87 echo 'y' | tazpkg remove ${pkg%/*} > /dev/null 1.88 @@ -99,7 +97,7 @@ 1.89 done 1.90 status ;; 1.91 noconf) 1.92 - echo "Sound configuration was disabled from cmdline..." ;; 1.93 + echo 'Sound configuration was disabled from cmdline...' ;; 1.94 *) 1.95 if [ -x /usr/sbin/soundconf ]; then 1.96 echo "Using sound kernel module $DRIVER..." 1.97 @@ -110,12 +108,12 @@ 1.98 elif [ -d /proc/asound ]; then 1.99 if [ -s /var/lib/alsa/asound.state ]; then 1.100 # Restore sound config for installed system 1.101 - echo "Restoring last alsa configuration..." 1.102 + echo 'Restoring last alsa configuration...' 1.103 (sleep 2; alsactl restore) & 1.104 else 1.105 # Initialize sound card 1.106 alsactl init 1.107 fi 1.108 else 1.109 - echo "WARNING: Unable to configure sound card" 1.110 + echo 'WARNING: Unable to configure sound card' 1.111 fi