slitaz-boot-scripts rev 80

will declare files in /etc
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue May 13 01:06:41 2008 +0200 (2008-05-13)
parents 485696cfeb05
children 462fdc0df26f
files etc/init.d/hwconf.sh etc/init.d/i18n.sh
line diff
     1.1 --- a/etc/init.d/hwconf.sh	Mon May 12 17:34:08 2008 +0200
     1.2 +++ b/etc/init.d/hwconf.sh	Tue May 13 01:06:41 2008 +0200
     1.3 @@ -4,7 +4,7 @@
     1.4  . /etc/init.d/rc.functions
     1.5  
     1.6  # Restore sound config for installed system.
     1.7 -if [ -f /var/lib/sound-card-driver ]; then
     1.8 +if [ -s /var/lib/sound-card-driver ]; then
     1.9  	echo -n "Restoring last alsa configuration..."
    1.10  	alsactl restore
    1.11  	status
    1.12 @@ -12,7 +12,7 @@
    1.13  
    1.14  # Detect PCI devices and load kernel module only at first boot 
    1.15  # or in LiveCD mode.
    1.16 -if [ ! -f /var/lib/detected-modules ]; then
    1.17 +if [ ! -s /var/lib/detected-modules ]; then
    1.18  	echo "Detecting PCI devices..."
    1.19  	MODULES_LIST=`lspci -k | grep "modules" | cut -d ":" -f 2 | sed s/-/_/g`
    1.20  	for mod in $MODULES_LIST
    1.21 @@ -75,7 +75,7 @@
    1.22  	/usr/sbin/setmixer
    1.23  # Start soundconf to config driver and load module for Live mode
    1.24  # if not yet detected.
    1.25 -elif [ ! -f /var/lib/sound-card-driver ]; then
    1.26 +elif [ ! -s /var/lib/sound-card-driver ]; then
    1.27  	if [ -x /usr/sbin/soundconf ]; then
    1.28  		/usr/sbin/soundconf
    1.29  	else
    1.30 @@ -84,7 +84,7 @@
    1.31  fi
    1.32  
    1.33  # Screen size config for slim/Xvesa (last config dialog befor login).
    1.34 -if [ ! -f /etc/X11/screen.conf -a -x /usr/bin/slim ]; then
    1.35 +if [ ! -s /etc/X11/screen.conf -a -x /usr/bin/slim ]; then
    1.36  	# $HOME is not yet set.
    1.37  	HOME=/root
    1.38  	if grep -q "screen=*" /proc/cmdline; then
     2.1 --- a/etc/init.d/i18n.sh	Mon May 12 17:34:08 2008 +0200
     2.2 +++ b/etc/init.d/i18n.sh	Tue May 13 01:06:41 2008 +0200
     2.3 @@ -7,7 +7,7 @@
     2.4  # Locale config.
     2.5  #
     2.6  echo "Cheking if /etc/locale.conf exist... "
     2.7 -if [ -f "/etc/locale.conf" ]; then
     2.8 +if [ -s "/etc/locale.conf" ]; then
     2.9  	echo -n "Locale configuration file exist... "
    2.10  	status
    2.11  else
    2.12 @@ -16,7 +16,7 @@
    2.13  
    2.14  # Keymap config.
    2.15  #
    2.16 -if [ -f "/etc/keymap.conf" ]; then
    2.17 +if [ -s "/etc/keymap.conf" ]; then
    2.18  	KEYMAP=`cat /etc/keymap.conf`
    2.19  	echo "Keymap configuration: $KEYMAP"
    2.20  	if [ -x /bin/loadkeys ]; then
    2.21 @@ -31,7 +31,7 @@
    2.22  # Timezone config. Set timezone using the keymap config for fr, be, fr_CH
    2.23  # and ca with Montreal.
    2.24  #
    2.25 -if [ ! -f "/etc/TZ" ]; then
    2.26 +if [ ! -s "/etc/TZ" ]; then
    2.27  	KEYMAP=`cat /etc/keymap.conf`
    2.28  	case "$KEYMAP" in
    2.29  		fr-latin1|be-latin1)
    2.30 @@ -66,7 +66,7 @@
    2.31  
    2.32  # Gen a motd in french if fr_* or in English by default.
    2.33  #
    2.34 -if [ ! -f "/etc/motd" ]; then
    2.35 +if [ ! -s "/etc/motd" ]; then
    2.36  if grep -q "fr_*" /etc/locale.conf; then
    2.37  		# FR
    2.38  		cat > /etc/motd << "EOF"