conf/73176: [patch] rc.d script for mixer settings

Philipp Huber philipp at adore.at
Tue Oct 26 12:20:16 PDT 2004


>Number:         73176
>Category:       conf
>Synopsis:       [patch] rc.d script for mixer settings
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Oct 26 19:20:15 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Philipp Huber
>Release:        FreeBSD 5.3-STABLE i386
>Organization:
>Environment:
System: FreeBSD bsdnew 5.3-STABLE FreeBSD 5.3-STABLE #3: Mon Oct 18 20:10:01 UTC 2004 root at bsdnew:/usr/obj/usr/src/sys/BSDNEW i386


>Description:
	This is a rc.d script for restoring mixer settings saved in the mixer.conf file.
>How-To-Repeat:
>Fix:


#!/bin/sh


# PROVIDE: mixerconf

. /etc/rc.subr

name="mixerconf"
start_cmd='read_mixerconf'
stop_cmd=':'

read_mixerconf()
{
	echo "Applying mixer settings..."

	mixerctrl="/usr/sbin/mixer"

	if [ -r /etc/mixer.conf ]; then
		while read action ; do
		

		left=${action%=*}
		right=${action#*=}

		case "${action}" in
		\#*)		;;
		rec_src*)  	(${mixerctrl} =rec ${right} 2>&1) >/dev/null
				;;
		*) 		${mixerctrl} ${left} ${right} 1>/dev/null
				;;
		esac

		done < /etc/mixer.conf
	fi
}

load_rc_config $name
run_rc_command "$1"

>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list