conf/75118: add modules support to /etc/rc.d/mixer

Jose M Rodriguez josemi at freebsd.jazzel.es
Wed Dec 15 07:20:21 PST 2004


>Number:         75118
>Category:       conf
>Synopsis:       add modules support to /etc/rc.d/mixer
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Dec 15 15:20:20 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Jose M Rodriguez
>Release:        FreeBSD 5.3-STABLE i386
>Organization:
Redes JM
>Environment:
System: FreeBSD orion.redesjm.local 5.3-STABLE FreeBSD 5.3-STABLE #0: Wed Dec 15 00:35:47 CET 2004 root at orion.redesjm.local:/usr/obj/usr/src/sys/ORION i386


>Description:
	Add modules support to /etc/rc.d/mixer

	use ${mixer_modules} (defined via /etc/rc.conf) a a blank separated
	list of loaded modules prior to mixer config reload

	Also make sound configuration by sysinstall possible via snd_* modules
	(but not implemented jet).

>How-To-Repeat:
>Fix:

--- patch-mixer_modules begins here ---
--- /usr/src/etc/rc.d/mixer	Sun Oct 10 11:50:53 2004
+++ etc/rc.d/mixer	Thu Dec  9 23:25:41 2004
@@ -40,6 +40,22 @@
 extra_commands="reload"
 
 #
+# Install needed modules
+#
+install_mixer_modules()
+{
+    local mixer_module
+
+    if [ -n "${mixer_modules}" ]; then
+	for mixer_module in "${mixer_modules}"; do
+	    if ! /sbin/kldstat -n ${mixer_module} > /dev/null 2>&1 ; then
+		/sbin/kldload ${mixer_module}
+	    fi
+	done
+    fi
+}
+
+#
 # List current mixer devices to stdout.
 #
 list_mixers()
@@ -81,6 +97,7 @@
 {
 	local mixer
 
+	install_mixer_modules
 	for mixer in `list_mixers`; do
 		mixer_restore ${mixer}
 	done
--- patch-mixer_modules ends here ---



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


More information about the freebsd-bugs mailing list