Re: RFC: sysctl -f filename

From: Hiroki Sato <hrs_at_FreeBSD.org>
Date: Sun, 02 Dec 2012 08:21:50 +0900 (JST)
Garrett Cooper <yanegomi_at_gmail.com> wrote
  in <CAGH67wShpcmOKhc09+MP5c-AOm7EAPG+Gqv=J0PRq0sGuTzKRQ_at_mail.gmail.com>:

ya> On Sat, Dec 1, 2012 at 2:10 PM, Garrett Cooper <yanegomi_at_gmail.com> wrote:
ya> >     Why change the tool when we can change the rc script to do the
ya> > right thing? I have a patch I'm working on to resolve this (you hit an
ya> > itch I've been meaning to scratch for a little while).
ya>
ya>     This should work. I also refactored the script to get it down to
ya> 80 columns. I've attached the debug output and the diff for the debug
ya> version of the script.

 You will find out the following test case does not work (this is one
 of the test strings I used):

 kern.domainname="c$EDITOR.\"\ hoge\ \"\#hoge2\\$ \# h$$\#oge"#

 The reason why I changed sysctl(8) was that the rc.d/sysctl script
 was too complex and slow even if it could support meta characters in
 shell script syntax.  I created several prototypes as script but
 noticed that keeping consistency was quite difficult and
 maintainability was poor due to tricky handling of variables.

 Although my patch in the previous email does not support meta
 characters completely, I still think it is more reasonable to
 implement this functionality on the sysctl(8) side.

-- Hiroki

Received on Sat Dec 01 2012 - 22:32:31 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:32 UTC