git: 4910c5a7d518 - stable/15 - rc: virtual_oss: Define some variables in rc.conf
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 07 Jun 2026 21:19:39 UTC
The branch stable/15 has been updated by christos:
URL: https://cgit.FreeBSD.org/src/commit/?id=4910c5a7d518411ba39a9228316cc572f3857a7c
commit 4910c5a7d518411ba39a9228316cc572f3857a7c
Author: Christos Margiolis <christos@FreeBSD.org>
AuthorDate: 2026-05-21 11:38:22 +0000
Commit: Christos Margiolis <christos@FreeBSD.org>
CommitDate: 2026-06-07 21:19:34 +0000
rc: virtual_oss: Define some variables in rc.conf
They will now be part of /etc/defaults/rc.conf and be accessible by
sysrc(8).
Fixes: 70e27ecba518 ("virtual_oss: Introduce virtual_oss_default_control_device rc variable")
PR: 295560
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: 0mp, jrm
Pull-Reqeust: https://ron-dev.freebsd.org/FreeBSD/src/pulls/33
(cherry picked from commit a576e5140ef352af6cf227528d1bfc6b964516c8)
---
libexec/rc/rc.conf | 6 +++++-
libexec/rc/rc.d/virtual_oss | 12 +-----------
2 files changed, 6 insertions(+), 12 deletions(-)
diff --git a/libexec/rc/rc.conf b/libexec/rc/rc.conf
index d497d7009a15..fdf6a24db119 100644
--- a/libexec/rc/rc.conf
+++ b/libexec/rc/rc.conf
@@ -733,7 +733,11 @@ newsyslog_flags="-CN" # Newsyslog flags to create marked files
mixer_enable="YES" # Run the sound mixer.
opensm_enable="NO" # Opensm(8) for infiniband devices defaults to off
nuageinit_enable="NO" # Run nuageinit at startup
-virtual_oss_enable="NO" # Run virtual_oss at startup
+
+virtual_oss_enable="NO" # Run virtual_oss at startup.
+virtual_oss_configs="dsp" # List of configurations.
+virtual_oss_default_control_device="vdsp.ctl" # Default configuration's
+ # control device.
# rctl(8) requires kernel options RACCT and RCTL
rctl_enable="YES" # Load rctl(8) rules on boot
diff --git a/libexec/rc/rc.d/virtual_oss b/libexec/rc/rc.d/virtual_oss
index 73a486f547a5..07f81aeed4bc 100644
--- a/libexec/rc/rc.d/virtual_oss
+++ b/libexec/rc/rc.d/virtual_oss
@@ -22,13 +22,9 @@ status_cmd="${name}_status"
required_modules="cuse"
-configs=
pidpath="/var/run/${name}"
-default_unit=$(sysctl -n hw.snd.default_unit 2> /dev/null)
-
-# Default configuration's control device.
-: "${virtual_oss_default_control_device:="vdsp.ctl"}"
+default_unit=$(sysctl -n hw.snd.default_unit 2> /dev/null)
virtual_oss_default_args="\
-S \
-C 2 \
@@ -42,12 +38,6 @@ virtual_oss_default_args="\
-l dsp.loop \
-t ${virtual_oss_default_control_device}"
-# Set to NO by default. Set it to "YES" to enable virtual_oss.
-: "${virtual_oss_enable:="NO"}"
-
-# List of configurations to use. Default is "dsp".
-: "${virtual_oss_configs:="dsp"}"
-
# Default (dsp) virtual_oss config.
: "${virtual_oss_dsp:="${virtual_oss_default_args}"}"