From owner-freebsd-current@FreeBSD.ORG Sat Dec 1 23:38:00 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 2C680290; Sat, 1 Dec 2012 23:38:00 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id BBB708FC08; Sat, 1 Dec 2012 23:37:59 +0000 (UTC) Received: from tom.home (localhost [127.0.0.1]) by kib.kiev.ua (8.14.5/8.14.5) with ESMTP id qB1NbuZp010540; Sun, 2 Dec 2012 01:37:56 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.7.1 kib.kiev.ua qB1NbuZp010540 Received: (from kostik@localhost) by tom.home (8.14.5/8.14.5/Submit) id qB1NbutC010539; Sun, 2 Dec 2012 01:37:56 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 2 Dec 2012 01:37:56 +0200 From: Konstantin Belousov To: Hiroki Sato Subject: Re: RFC: sysctl -f filename Message-ID: <20121201233756.GS3013@kib.kiev.ua> References: <20121202.015048.1122480556487090170.hrs@allbsd.org> <20121202.082150.896017277887885294.hrs@allbsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="lfL9iWt62hyVv4Jn" Content-Disposition: inline In-Reply-To: <20121202.082150.896017277887885294.hrs@allbsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on tom.home Cc: yanegomi@gmail.com, 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:38:00 -0000 --lfL9iWt62hyVv4Jn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Dec 02, 2012 at 08:21:50AM +0900, Hiroki Sato wrote: > Garrett Cooper wrote > in : >=20 > ya> On Sat, Dec 1, 2012 at 2:10 PM, Garrett Cooper w= rote: > 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. >=20 > You will find out the following test case does not work (this is one > of the test strings I used): >=20 > kern.domainname=3D"c$EDITOR.\"\ hoge\ \"\#hoge2\\$ \# h$$\#oge"# >=20 > 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. >=20 > 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. >=20 > -- 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=20 the rc script is weird. --lfL9iWt62hyVv4Jn Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iQIcBAEBAgAGBQJQupTTAAoJEJDCuSvBvK1BSLEQAIKuOn4rfK6jKjfEL1dbQV5k Ioqan+cvl4GoDZVBfF+NL6U22qBQdbuRa0rV8V1SnG8UYc/hjqd65Xxl00G6CRAb zhuR1kccpxjp2IN4wyYdGecXi00iRqdJeWGinL03Z/NpCr0zrgMR9RA5zM9KcJrZ vofQbkY/28VqsxxS6S/i8avbV3060T81EeupzFW5olv8Gf97M3nDiRJbP0S4EwXV QXs3rIONv+Y8+Ny00sVDfyBxfQ66nRYbmvlJcs/5SNW7cfk6BGg+4g81hNhmGlCb L4SKBMoiW+1Ls1AxhFOFUSFCL4xVINP6px4LqL/TJYR0mTrIYe7YCPDih4KYkIL4 U8DTbCbZTwBegnExNyDNeDgBug/JyIMrjBfFJeoNhKc6Kqw2inL5eO5lY49bE0hB ypiy8FXNjU0cW0OwrC8TvANstJ4Gif98DKjc9OufoatK7LKCDLgxPJ0gtV6mL+V4 605dXtURT6sIWgrrmSbYWVukUlEF7IOgCU/S2OZzz3mrsFC1kTlpOKboH+TLvLd8 OWaDJMnNEj5IOyQUJJ5RSAAKD9K9Pyy2StOLQOtoMCa5FdFANtVLnY3IXfh+wP2+ dqb2Wxg6r9h1iseaETCKxsDtroIw5GDqnYx1qZIUozD26q0hoiF5POn26jZKIMZ9 R7ym6rVAvCTGZlxULVyk =2uEK -----END PGP SIGNATURE----- --lfL9iWt62hyVv4Jn--