On Sun, Dec 02, 2012 at 08:21:50AM +0900, Hiroki Sato wrote: > Garrett Cooper <yaneg...@gmail.com> wrote > in <CAGH67wShpcmOKhc09+MP5c-AOm7EAPG+Gqv=j0prq0sgutz...@mail.gmail.com>: > > ya> On Sat, Dec 1, 2012 at 2:10 PM, Garrett Cooper <yaneg...@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
I fully agree with the proposal to add the -f switch to the sysctl(8). This is consistent with several other administrative tools. Putting the ability to parse and apply arbitrary sysctl.conf-like file into the rc script is weird.
pgpUFkeEgXaKN.pgp
Description: PGP signature