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

Typo and modified shutdown screen output
author Christophe Lincoln <pankso@slitaz.org>
date Sat Feb 23 01:42:47 2008 +0100 (2008-02-23)
parents a993095d2da8
children 8d77d0bba811
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=no" /proc/cmdline; then
10 echo -n "Removing all sound kernel modules..."
11 rm -rf /lib/modules/`uname -r`/kernel/sound
12 status
13 echo -n "Removing all sound packages..."
14 for i in $(grep -l '^DEPENDS=.*alsa-lib' /var/lib/tazpkg/installed/*/receipt) ; do
15 pkg=${i#/var/lib/tazpkg/installed/}
16 echo 'y' | tazpkg remove ${pkg%/*} > /dev/null
17 done
18 echo 'y' | tazpkg remove alsa-lib > /dev/null
19 status
20 else
21 # Config or not config
22 if grep -q -w "sound=noconf" /proc/cmdline; then
23 echo "Sound configuration is disable from cmdline..."
24 elif [ ! -f /var/lib/sound-card-driver ]; then
25 if [ -f /usr/sbin/soundconf ]; then
26 # Start soundconf to config driver and load module for Live mode
27 /usr/sbin/soundconf
28 else
29 echo "Unable to found: /usr/sbin/soundconf"
30 fi
31 else
32 # /var/lib/sound-card-driver exist so sound is already configured.
33 continue
34 fi
35 fi
36 # Restore sound config for installed system.
37 if [ -f /var/lib/sound-card-driver ]; then
38 echo -n "Restoring last alsa configuration..."
39 alsactl restore
40 status
41 fi
43 # Screen size config for slim/Xvesa.
44 if [ ! -f /etc/X11/screen.conf -a -e /usr/bin/slim ]; then
45 tazx
46 fi