[PC-BSD Testing] sound-dev-changed.sh

N V vans9 at yandex.ru
Tue Oct 2 03:14:09 PDT 2012


Hi.

Here is a little patch, eleminating the use of temp file in /tmp.

Regards,
Vans.

Index: sound-dev-changed.sh
===================================================================
--- sound-dev-changed.sh	(revision 19575)
+++ sound-dev-changed.sh	(working copy)
@@ -5,9 +5,9 @@
 
 regen_ossconf()
 {
-
+PCM_OSS_CONF=/compat/linux/etc/alsa/pcm/pcm-oss.conf
 PCM=`egrep -o 'pcm[0-9]+' /dev/sndstat | egrep -o '[0-9]+'`
-cat > /tmp/pcm-oss.conf <<EOF
+OSSCONF=`cat <<EOF
 # pcm-oss plugin configuration
 
 pcm.oss {
@@ -25,11 +25,12 @@
                 description "Open Sound System"
         }
 }
+EOF`
 
-EOF
-
 for NUM in $PCM; do
-  cat >> /tmp/pcm-oss.conf <<EOF
+  OSSCONF_UNITS=${OSSCONF_UNITS}`cat <<EOF
+ 
+ 
 pcm.oss${NUM} {
 	type oss
 	device /dev/dsp${NUM}
@@ -45,11 +46,10 @@
 		description "Open Sound System Unit ${NUM}"
 	}
 }
+EOF`
+done
 
-EOF
-
-done
-mv /tmp/pcm-oss.conf /compat/linux/etc/alsa/pcm/pcm-oss.conf
+echo "${OSSCONF}${OSSCONF_UNITS}" > $PCM_OSS_CONF
 }
 
 set_new_dev()

On 25 сентября 2012 18:00:26 Kris Moore wrote:
> On 09/25/2012 04:40, N V wrote:
> > Hi.
> > 
> > I've found script sound-dev-changed.sh has been extended with the setting
> > of the default_unit. Let me notice that we should change default unit if
> > this unit have playback, imho. I have a plan to extend this script, but
> > that should be done before RC2. Is there RC2 somethere on the horizon?
> > 
> > Regards,
> > Vans.
> > _______________________________________________
> > Testing mailing list
> > Testing at lists.pcbsd.org
> > http://lists.pcbsd.org/mailman/listinfo/testing
> 
> RC2 is still in waiting, FreeBSD is still not RC2 yet...
> 
> If you want to extend the script, send a patch and I'll get it in!


More information about the Testing mailing list