slitaz-boot-scripts rev 136
Fix: restore sound mixer config and dont erase it just after
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Tue Feb 17 23:26:53 2009 +0100 (2009-02-17) |
parents | d549fce3ce20 |
children | 48447c5a5a52 |
files | etc/init.d/hwconf.sh |
line diff
1.1 --- a/etc/init.d/hwconf.sh Tue Feb 17 21:40:18 2009 +0100 1.2 +++ b/etc/init.d/hwconf.sh Tue Feb 17 23:26:53 2009 +0100 1.3 @@ -3,13 +3,6 @@ 1.4 # 1.5 . /etc/init.d/rc.functions 1.6 1.7 -# Restore sound config for installed system. 1.8 -if [ -s /var/lib/sound-card-driver ]; then 1.9 - echo -n "Restoring last alsa configuration..." 1.10 - alsactl restore 1.11 - status 1.12 -fi 1.13 - 1.14 # Detect PCI devices and load kernel module only at first boot 1.15 # or in LiveCD mode. 1.16 if [ ! -s /var/lib/detected-modules ]; then 1.17 @@ -79,7 +72,14 @@ 1.18 elif [ -d /proc/asound ]; then 1.19 cp /proc/asound/modules /var/lib/sound-card-driver 1.20 /usr/bin/amixer >/dev/null || /usr/sbin/soundconf 1.21 - /usr/sbin/setmixer 1.22 + # Restore sound config for installed system. 1.23 + if [ -s /etc/asound.state ]; then 1.24 + echo -n "Restoring last alsa configuration..." 1.25 + alsactl restore 1.26 + status 1.27 + else 1.28 + /usr/sbin/setmixer 1.29 + fi 1.30 # Start soundconf to config driver and load module for Live mode 1.31 # if not yet detected. 1.32 elif [ ! -s /var/lib/sound-card-driver ]; then