From owner-freebsd-rc@FreeBSD.ORG  Sat Dec  1 23:32:31 2012
Return-Path: <owner-freebsd-rc@FreeBSD.ORG>
Delivered-To: rc@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 <hrs@FreeBSD.org>
In-Reply-To: <CAGH67wShpcmOKhc09+MP5c-AOm7EAPG+Gqv=J0PRq0sGuTzKRQ@mail.gmail.com>
References: <20121202.015048.1122480556487090170.hrs@allbsd.org>
 <CAGH67wTC50X1M2uUo0g=Nm6PmpOXPzYnp4tbXDCQyA9eOKB+7Q@mail.gmail.com>
 <CAGH67wShpcmOKhc09+MP5c-AOm7EAPG+Gqv=J0PRq0sGuTzKRQ@mail.gmail.com>
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-rc@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "Discussion related to /etc/rc.d design and implementation."
 <freebsd-rc.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/options/freebsd-rc>,
 <mailto:freebsd-rc-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-rc>
List-Post: <mailto:freebsd-rc@freebsd.org>
List-Help: <mailto:freebsd-rc-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-rc>,
 <mailto:freebsd-rc-request@freebsd.org?subject=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 <yanegomi@gmail.com> wrote
  in <CAGH67wShpcmOKhc09+MP5c-AOm7EAPG+Gqv=J0PRq0sGuTzKRQ@mail.gmail.com>:

ya> On Sat, Dec 1, 2012 at 2:10 PM, Garrett Cooper <yanegomi@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

----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)----