slitaz-boot-scripts view etc/init.d/hwconf.sh @ 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
children 337a083dc89f
line source
1 #!/bin/sh
2 # /etc/init.d/hwconf.sh - SliTaz hardware autoconfiguration.
3 #
5 # Sound configuration stuff. First check if sound=no and remoce all sound
6 # Kernel modules.
7 #
8 if grep -q "sound=no" /proc/cmdline; then
9 echo -n "Removing all sound kernel modules..."
10 rm -rf /lib/modules/`uname -r`/kernel/sound
11 status
12 else
13 # Config or not config
14 if grep -q "sound=noconf" /proc/cmdline; then
15 echo "Sound configuration is disable from cmdline..."
16 elif [ ! -f /var/lib/sound-card-driver ]; then
17 if [ -f /usr/sbin/soundconf ]; then
18 # Start soundconf to config driver and load module for Live mode
19 /usr/sbin/soundconf
20 else
21 echo "Unable to found : /usr/sbin/soundconf"
22 fi
23 else
24 # /var/lib/sound-card-driver exist so sound is already configured.
25 continue
26 fi
27 fi
29 # Creat /dev/cdrom if needed (symlink does not exist on LiveCD.
30 #
31 if [ ! "`readlink /dev/cdrom`" ]; then
32 DRIVE_NAME=`cat /proc/sys/dev/cdrom/info | grep "drive name" | cut -f 3`
33 echo -n "Creating symlink : /dev/cdrom..."
34 ln -s /dev/$DRIVE_NAME /dev/cdrom
35 status
36 fi