# HG changeset patch # User Christophe Lincoln # Date 1196680756 -3600 # Node ID a5e2677812ab1085f2fef0da15b0fcf5609292c5 # Parent 07d37a2f51f62964839a445992cd48e86e17b931 Add /etc/init.d/hwconf.sh (hardware configuration) diff -r 07d37a2f51f6 -r a5e2677812ab etc/init.d/hwconf.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/etc/init.d/hwconf.sh Mon Dec 03 12:19:16 2007 +0100 @@ -0,0 +1,37 @@ +#!/bin/sh +# /etc/init.d/hwconf.sh - SliTaz hardware autoconfiguration. +# + +# Sound configuration stuff. First check if sound=no and remoce all sound +# Kernel modules. +# +if grep -q "sound=no" /proc/cmdline; then + echo -n "Removing all sound kernel modules..." + rm -rf /lib/modules/`uname -r`/kernel/sound + status +else + # Config or not config + if grep -q "sound=noconf" /proc/cmdline; then + echo "Sound configuration is disable from cmdline..." + elif [ ! -f /var/lib/sound-card-driver ]; then + if [ -f /usr/sbin/soundconf ]; then + # Start soundconf to config driver and load module for Live mode + /usr/sbin/soundconf + else + echo "Unable to found : /usr/sbin/soundconf" + fi + else + # /var/lib/sound-card-driver exist so sound is already configured. + continue + fi +fi + +# Creat /dev/cdrom if needed (symlink does not exist on LiveCD. +# +if [ ! "`readlink /dev/cdrom`" ]; then + DRIVE_NAME=`cat /proc/sys/dev/cdrom/info | grep "drive name" | cut -f 3` + echo -n "Creating symlink : /dev/cdrom..." + ln -s /dev/$DRIVE_NAME /dev/cdrom + status +fi + diff -r 07d37a2f51f6 -r a5e2677812ab etc/init.d/rcS --- a/etc/init.d/rcS Mon Dec 03 12:15:42 2007 +0100 +++ b/etc/init.d/rcS Mon Dec 03 12:19:16 2007 +0100 @@ -72,14 +72,6 @@ echo "Kernel log daemons are disabled in /etc/rc.conf... " fi -# Creat /dev/cdrom if needed. -if [ ! "`readlink /dev/cdrom`" ]; then - DRIVE_NAME=`cat /proc/sys/dev/cdrom/info | grep "drive name" | cut -f 3` - echo -n "Creating symlink : /dev/cdrom..." - ln -s /dev/$DRIVE_NAME /dev/cdrom - status -fi - # Clean up the system. if [ "$CLEAN_UP_SYSTEM" = "yes" ]; then echo -n "Cleaning up the system... " diff -r 07d37a2f51f6 -r a5e2677812ab etc/rcS.conf --- a/etc/rcS.conf Mon Dec 03 12:15:42 2007 +0100 +++ b/etc/rcS.conf Mon Dec 03 12:19:16 2007 +0100 @@ -22,13 +22,13 @@ # # Fot Intel and some Nvidia sound cards : snd_intel8x0 snd_intel8x0m snd_hda_intel # -LOAD_MODULES="vfat nls_utf8 ohci_hcd snd" +LOAD_MODULES="vfat nls_utf8 ohci_hcd" # Initialisation scripts to run at boot time. Boot order is important, # bootopts.sh (boot options) must start first, then you free to choose. Note # that the local.sh script exist to let you quick add some local startup # commands. -RUN_SCRIPTS="bootopts.sh network.sh i18n.sh local.sh" +RUN_SCRIPTS="bootopts.sh network.sh i18n.sh hwconf.sh local.sh" # Daemons to start at boot time. SliTaz provide only a few daemons, firewall, # Web server (lighttpd), SSH server (dropbear) and rsyncd, so boot order is