From owner-freebsd-current@FreeBSD.ORG Sat Dec 1 23:32:31 2012 Return-Path: Delivered-To: current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E610294; Sat, 1 Dec 2012 23:32:31 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from mail.allbsd.org (gatekeeper.allbsd.org [IPv6:2001:2f0:104:e001::32]) by mx1.freebsd.org (Postfix) with ESMTP id AB1F88FC12; Sat, 1 Dec 2012 23:32:27 +0000 (UTC) Received: from alph.allbsd.org (p1137-ipbf1505funabasi.chiba.ocn.ne.jp [118.7.212.137]) (authenticated bits=128) by mail.allbsd.org (8.14.5/8.14.5) with ESMTP id qB1NWACj098678 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 2 Dec 2012 08:32:20 +0900 (JST) (envelope-from hrs@FreeBSD.org) Received: from localhost (localhost [127.0.0.1]) (authenticated bits=0) by alph.allbsd.org (8.14.5/8.14.5) with ESMTP id qB1NW8Vn050788; Sun, 2 Dec 2012 08:32:09 +0900 (JST) (envelope-from hrs@FreeBSD.org) Date: Sun, 02 Dec 2012 08:21:50 +0900 (JST) Message-Id: <20121202.082150.896017277887885294.hrs@allbsd.org> To: yanegomi@gmail.com Subject: Re: RFC: sysctl -f filename From: Hiroki Sato In-Reply-To: References: <20121202.015048.1122480556487090170.hrs@allbsd.org> X-PGPkey-fingerprint: BDB3 443F A5DD B3D0 A530 FFD7 4F2C D3D8 2793 CF2D X-Mailer: Mew version 6.5 on Emacs 23.4 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Multipart/Signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="--Security_Multipart(Sun_Dec__2_08_21_50_2012_024)--" Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.97.4 at gatekeeper.allbsd.org X-Virus-Status: Clean X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (mail.allbsd.org [133.31.130.32]); Sun, 02 Dec 2012 08:32:20 +0900 (JST) X-Spam-Status: No, score=-98.1 required=13.0 tests=CONTENT_TYPE_PRESENT, ONLY1HOPDIRECT,SAMEHELOBY2HOP,USER_IN_WHITELIST autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on gatekeeper.allbsd.org Cc: rc@FreeBSD.org, current@FreeBSD.org X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Dec 2012 23:32:32 -0000 ----Security_Multipart(Sun_Dec__2_08_21_50_2012_024)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Garrett Cooper wrote in : ya> On Sat, Dec 1, 2012 at 2:10 PM, Garrett Cooper 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 ----Security_Multipart(Sun_Dec__2_08_21_50_2012_024)-- Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEABECAAYFAlC6kQ4ACgkQTyzT2CeTzy1sjQCguq+9gj8qNTMzQJbV1uVmyoCL RagAoNktNXOzlZuAk5aZC9Ax7MH0oyiN =ZWBX -----END PGP SIGNATURE----- ----Security_Multipart(Sun_Dec__2_08_21_50_2012_024)----