From owner-freebsd-questions Sat Nov 25 15:41:14 2000 Delivered-To: freebsd-questions@freebsd.org Received: from guru.mired.org (okc-65-26-235-186.mmcable.com [65.26.235.186]) by hub.freebsd.org (Postfix) with SMTP id D5F3F37B4CF for ; Sat, 25 Nov 2000 15:41:11 -0800 (PST) Received: (qmail 81076 invoked by uid 100); 25 Nov 2000 23:41:10 -0000 From: Mike Meyer MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <14880.19990.870014.192247@guru.mired.org> Date: Sat, 25 Nov 2000 17:41:10 -0600 (CST) To: "Otter" Cc: questions@freebsd.org Subject: RE: saving pcm mixer settings In-Reply-To: <75936594@toto.iv> X-Mailer: VM 6.75 under 21.1 (patch 10) "Capitol Reef" XEmacs Lucid X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`;h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Otter types: > Alfred, > I had thought if this, but wasn't there a rewrite some time back that > requires all the .sh scripts in the rc.d directory to work with a > start/stop command? Or was it just a compatibility issue and not a > requirement to use the start/stop flags? It may not be a requirement, but it's not like it's hard. Actually, it gives you a chance to save the mixer settings on the way down as well. Here's what I put in /usr/local/etc/rc.d: #!/bin/sh MIXERSTATE=/var/db/mixer-state case $1 in start) [ -r $MIXERSTATE ] && /usr/sbin/mixer `cat $MIXERSTATE` > /dev/null ;; stop) /usr/sbin/mixer -s > $MIXERSTATE ;; *) echo "usage: `basename $0` {start|stop}" >&2 exit 64 ;; esac -- Mike Meyer http://www.mired.org/home/mwm/ Freelance WWW/Unix/FreeBSD consultant, email for rates. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message