| 1 | #!/sbin/runscript |
1 | #!/sbin/runscript |
| 2 | # Copyright 1999-2005 Gentoo Foundation |
2 | # Copyright 1999-2005 Gentoo Foundation |
| 3 | # Distributed under the terms of the GNU General Public License v2 |
3 | # Distributed under the terms of the GNU General Public License v2 |
| 4 | # $Header: /var/cvsroot/gentoo/src/livecd-tools/autoconfig,v 1.38 2005/08/01 23:40:30 wolf31o2 Exp $ |
4 | # $Header: /var/cvsroot/gentoo/src/livecd-tools/autoconfig,v 1.39 2005/08/02 14:07:06 wolf31o2 Exp $ |
| 5 | |
5 | |
| 6 | DHCP="yes" |
6 | DHCP="yes" |
| 7 | DETECT="yes" |
7 | DETECT="yes" |
| 8 | GPM="yes" |
8 | GPM="yes" |
| 9 | PCMCIA="no" |
9 | PCMCIA="no" |
| … | |
… | |
| 242 | schedule_service_startup alsasound |
242 | schedule_service_startup alsasound |
| 243 | else |
243 | else |
| 244 | ebegin ${WARN}"/etc/init.d/alsasound not found, skipping." |
244 | ebegin ${WARN}"/etc/init.d/alsasound not found, skipping." |
| 245 | einfo "You will need to set volume controls manually." |
245 | einfo "You will need to set volume controls manually." |
| 246 | fi |
246 | fi |
|
|
247 | for i in $(cat /proc/asound/cards | cut -d" " -f1) |
|
|
248 | do |
| 247 | if [ -d /proc/asound/card0 ] && [ -x /usr/bin/amixer ] |
249 | if [ -d /proc/asound/card$i ] && [ -x /usr/bin/amixer ] |
| 248 | then |
|
|
| 249 | amixer scontrols > /etc/amixer |
|
|
| 250 | if [ -n "$(grep Master /etc/amixer)" ] |
|
|
| 251 | then |
250 | then |
|
|
251 | amixer -c $i scontrols > /etc/amixer |
|
|
252 | if [ -n "$(grep Master /etc/amixer)" ] |
|
|
253 | then |
| 252 | amixer -q set Master 95% unmute >/dev/null 2>&1 |
254 | amixer -c $i -q set Master 95% unmute >/dev/null 2>&1 |
|
|
255 | fi |
|
|
256 | if [ -n "$(grep PCM /etc/amixer)" ] |
|
|
257 | then |
|
|
258 | amixer -c $i -q set PCM 95% unmute >/dev/null 2>&1 |
|
|
259 | fi |
|
|
260 | if [ -n "$(grep Mic /etc/amixer)" ] |
|
|
261 | then |
|
|
262 | amixer -c $i -q set Mic 95% mute cap >/dev/null 2>&1 |
|
|
263 | fi |
|
|
264 | if [ -n "$(grep Wave /etc/amixer)" ] |
|
|
265 | then |
|
|
266 | amixer -c $i -q set Wave 95% unmute >/dev/null 2>&1 |
|
|
267 | fi |
|
|
268 | if [ -n "$(grep Capture /etc/amixer)" ] |
|
|
269 | then |
|
|
270 | amixer -c $i -q set Capture 95% unmute cap >/dev/null 2>&1 |
|
|
271 | fi |
| 253 | fi |
272 | fi |
| 254 | if [ -n "$(grep PCM /etc/amixer)" ] |
273 | done |
| 255 | then |
|
|
| 256 | amixer -q set PCM 95% unmute >/dev/null 2>&1 |
|
|
| 257 | fi |
|
|
| 258 | if [ -n "$(grep Mic /etc/amixer)" ] |
|
|
| 259 | then |
|
|
| 260 | amixer -q set Mic 95% mute cap >/dev/null 2>&1 |
|
|
| 261 | fi |
|
|
| 262 | if [ -n "$(grep Wave /etc/amixer)" ] |
|
|
| 263 | then |
|
|
| 264 | amixer -q set Wave 95% unmute >/dev/null 2>&1 |
|
|
| 265 | fi |
|
|
| 266 | if [ -n "$(grep Capture /etc/amixer)" ] |
|
|
| 267 | then |
|
|
| 268 | amixer -q set Capture 95% unmute cap >/dev/null 2>&1 |
|
|
| 269 | fi |
|
|
| 270 | fi |
|
|
| 271 | fi |
274 | fi |
| 272 | else |
275 | else |
| 273 | ebegin ${BAD}"Skipping ALSA detection as requested on boot commandline." |
276 | ebegin ${BAD}"Skipping ALSA detection as requested on boot commandline." |
| 274 | fi |
277 | fi |
| 275 | |
278 | |