slitaz-boot-scripts view etc/init.d/hwconf.sh @ rev 43

Typo in hwconf
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Mar 05 09:30:21 2008 +0000 (2008-03-05)
parents 3da6316620ef
children 07a3b7b65370
line source
1 #!/bin/sh
2 # /etc/init.d/hwconf.sh - SliTaz hardware autoconfiguration.
3 #
4 . /etc/init.d/rc.functions
6 # Sound configuration stuff. First check if sound=no and remoce all sound
7 # Kernel modules.
8 #
9 if grep -q -w "sound=" /proc/cmdline; then
10 DRIVER=`cat /proc/cmdline | sed 's/.*sound=\([^ ]*\).*/\1/'`
11 case "$DRIVER" in
12 no)
13 echo -n "Removing all sound kernel modules..."
14 rm -rf /lib/modules/`uname -r`/kernel/sound
15 status
16 echo -n "Removing all sound packages..."
17 for i in $(grep -l '^DEPENDS=.*alsa-lib' /var/lib/tazpkg/installed/*/receipt) ; do
18 pkg=${i#/var/lib/tazpkg/installed/}
19 echo 'y' | tazpkg remove ${pkg%/*} > /dev/null
20 done
21 echo 'y' | tazpkg remove alsa-lib > /dev/null
22 status;;
23 noconf)
24 echo "Sound configuration is disable from cmdline...";;
25 *)
26 echo "Using sound kernel module $DRIVER..."
27 echo "snd-$DRIVER" > /var/lib/sound-card-driver;;
28 esac
29 elif [ ! -f /var/lib/sound-card-driver ]; then
30 if [ -x /usr/sbin/soundconf ]; then
31 # Start soundconf to config driver and load module for Live mode
32 /usr/sbin/soundconf
33 else
34 echo "Unable to found: /usr/sbin/soundconf"
35 fi
36 fi
38 # Restore sound config for installed system.
39 if [ -f /var/lib/sound-card-driver ]; then
40 echo -n "Restoring last alsa configuration..."
41 alsactl restore
42 status
43 fi
45 # Screen size config for slim/Xvesa.
46 if [ ! -f /etc/X11/screen.conf -a -x /usr/bin/slim ]; then
47 if grep -q "screen=*" /proc/cmdline; then
48 export NEW_SCREEN=`cat /proc/cmdline | sed 's/.*screen=\([^ ]*\).*/\1/'`
49 if [ "$NEW_SCREEN" = "text" ]; then
50 echo -n "Disabling X login manager: slim..."
51 sed -i s/'slim'/''/ /etc/rcS.conf
52 status
53 else
54 tazx
55 fi
56 else
57 tazx
58 fi
59 fi