Date: Thu, 28 Feb 2013 08:45:11 +0100 From: Andreas Nilsson <andrnils@gmail.com> To: Chris Rees <crees@freebsd.org> Cc: FreeBSD Stable Mailing List <freebsd-stable@freebsd.org> Subject: Re: rc.d/sysctl fails to parse sysctl.conf Message-ID: <CAPS9%2BSuvNfks3LLSnyszj5GH%2B-iaF2jfzMNzvCaMNtz%2BF4r_2A@mail.gmail.com> In-Reply-To: <CADLo838RX=BfhWJ6Obxaxk9qBDBJTkHo2ee=Fudeh7s=ucuT8A@mail.gmail.com> References: <CAPS9%2BSt0mc=7OVNbrKG5dR6oXz6ywsobwFNqeNC_rkkYQMugeA@mail.gmail.com> <CADLo838RX=BfhWJ6Obxaxk9qBDBJTkHo2ee=Fudeh7s=ucuT8A@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Feb 27, 2013 at 10:39 PM, Chris Rees <crees@freebsd.org> wrote: > On 27 February 2013 21:19, Andreas Nilsson <andrnils@gmail.com> wrote: > > Hello, > > > > I tried to get my sound working, and long story short: rc.d/sysctl parses > > sysctl.conf wrongly if there are sysctls of the form > > > > mib=val1=val2 > > > > which is what you need for sound. For reference I needed/wanted > > > > dev.hdaa.4.nid25_config=as=1,seq=15 > > dev.hdaa.4.nid31_config=as=1 > > > > I believe the following patch would address the incorrect parsing: > > > > --- /etc/rc.d/sysctl.old 2013-02-27 22:00:00.000000000 +0100 > > +++ /etc/rc.d/sysctl 2013-02-27 22:05:24.000000000 +0100 > > @@ -26,7 +26,7 @@ > > \#*|'') > > ;; > > *) > > - mib=${var%=*} > > + mib=${var%%=*} > > val=${var#*=} > > > > if current_value=`${SYSCTL} -n ${mib} > > 2>/dev/null`; then > > I think that this is the right thing to do here. > > Chris > As a follow-up question: is sysctl.conf supposed to handle all valid input one can give sysctl on the command line? Using the above example would normally be typed: sysctl dev.hdaa.4.nid25_config="as=1 seq=15" which works, but fails to work from sysctl.conf Best regards Andreas
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAPS9%2BSuvNfks3LLSnyszj5GH%2B-iaF2jfzMNzvCaMNtz%2BF4r_2A>