slitaz-boot-scripts rev 11

Add /etc/init.d/hwconf.sh (hardware configuration)
author Christophe Lincoln <pankso@slitaz.org>
date Mon Dec 03 12:19:16 2007 +0100 (2007-12-03)
parents 07d37a2f51f6
children 337a083dc89f
files etc/init.d/hwconf.sh etc/init.d/rcS etc/rcS.conf
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/etc/init.d/hwconf.sh	Mon Dec 03 12:19:16 2007 +0100
     1.3 @@ -0,0 +1,37 @@
     1.4 +#!/bin/sh
     1.5 +# /etc/init.d/hwconf.sh - SliTaz hardware autoconfiguration.
     1.6 +#
     1.7 +
     1.8 +# Sound configuration stuff. First check if sound=no and remoce all sound
     1.9 +# Kernel modules.
    1.10 +#
    1.11 +if grep -q "sound=no" /proc/cmdline; then
    1.12 +	echo -n "Removing all sound kernel modules..."
    1.13 +	rm -rf /lib/modules/`uname -r`/kernel/sound
    1.14 +	status
    1.15 +else
    1.16 +	# Config or not config
    1.17 +	if grep -q "sound=noconf" /proc/cmdline; then
    1.18 +		echo "Sound configuration is disable from cmdline..."
    1.19 +	elif [ ! -f /var/lib/sound-card-driver ]; then
    1.20 +		if [ -f /usr/sbin/soundconf ]; then
    1.21 +			# Start soundconf to config driver and load module for Live mode
    1.22 +			/usr/sbin/soundconf
    1.23 +		else
    1.24 +			echo "Unable to found : /usr/sbin/soundconf"
    1.25 +		fi
    1.26 +	else
    1.27 +		# /var/lib/sound-card-driver exist so sound is already configured.
    1.28 +		continue
    1.29 +	fi
    1.30 +fi
    1.31 +
    1.32 +# Creat /dev/cdrom if needed (symlink does not exist on LiveCD.
    1.33 +#
    1.34 +if [ ! "`readlink /dev/cdrom`" ]; then
    1.35 +	DRIVE_NAME=`cat /proc/sys/dev/cdrom/info | grep "drive name" | cut -f 3`
    1.36 +	echo -n "Creating symlink : /dev/cdrom..."
    1.37 +	ln -s /dev/$DRIVE_NAME /dev/cdrom
    1.38 +	status
    1.39 +fi
    1.40 +
     2.1 --- a/etc/init.d/rcS	Mon Dec 03 12:15:42 2007 +0100
     2.2 +++ b/etc/init.d/rcS	Mon Dec 03 12:19:16 2007 +0100
     2.3 @@ -72,14 +72,6 @@
     2.4  	echo "Kernel log daemons are disabled in /etc/rc.conf... "
     2.5  fi
     2.6  
     2.7 -# Creat /dev/cdrom if needed.
     2.8 -if [ ! "`readlink /dev/cdrom`" ]; then
     2.9 -	DRIVE_NAME=`cat /proc/sys/dev/cdrom/info | grep "drive name" | cut -f 3`
    2.10 -	echo -n "Creating symlink : /dev/cdrom..."
    2.11 -	ln -s /dev/$DRIVE_NAME /dev/cdrom
    2.12 -	status
    2.13 -fi
    2.14 -
    2.15  # Clean up the system.
    2.16  if [ "$CLEAN_UP_SYSTEM" = "yes" ]; then
    2.17  	echo -n "Cleaning up the system... "
     3.1 --- a/etc/rcS.conf	Mon Dec 03 12:15:42 2007 +0100
     3.2 +++ b/etc/rcS.conf	Mon Dec 03 12:19:16 2007 +0100
     3.3 @@ -22,13 +22,13 @@
     3.4  #
     3.5  # Fot Intel and some Nvidia sound cards : snd_intel8x0 snd_intel8x0m snd_hda_intel
     3.6  #
     3.7 -LOAD_MODULES="vfat nls_utf8 ohci_hcd snd"
     3.8 +LOAD_MODULES="vfat nls_utf8 ohci_hcd"
     3.9  
    3.10  # Initialisation scripts to run at boot time. Boot order is important,
    3.11  # bootopts.sh (boot options) must start first, then you free to choose. Note
    3.12  # that the local.sh script exist to let you quick add some local startup
    3.13  # commands.
    3.14 -RUN_SCRIPTS="bootopts.sh network.sh i18n.sh local.sh"
    3.15 +RUN_SCRIPTS="bootopts.sh network.sh i18n.sh hwconf.sh local.sh"
    3.16  
    3.17  # Daemons to start at boot time. SliTaz provide only a few daemons, firewall,
    3.18  # Web server (lighttpd), SSH server (dropbear) and rsyncd, so boot order is