From owner-freebsd-hackers Thu Jan 2 13: 1:15 2003 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AE84A37B40C for ; Thu, 2 Jan 2003 13:01:08 -0800 (PST) Received: from ussenterprise.ufp.org (ussenterprise.ufp.org [208.185.30.210]) by mx1.FreeBSD.org (Postfix) with ESMTP id A8F0E43ED4 for ; Thu, 2 Jan 2003 13:01:07 -0800 (PST) (envelope-from bicknell@ussenterprise.ufp.org) Received: (from bicknell@localhost) by ussenterprise.ufp.org (8.11.1/8.11.1) id h02L17784257 for freebsd-hackers@FreeBSD.ORG; Thu, 2 Jan 2003 16:01:07 -0500 (EST) (envelope-from bicknell) Date: Thu, 2 Jan 2003 16:01:07 -0500 From: Leo Bicknell To: freebsd-hackers@FreeBSD.ORG Subject: Re: Reading rc.conf from C programs? Message-ID: <20030102210106.GB83573@ussenterprise.ufp.org> Mail-Followup-To: freebsd-hackers@FreeBSD.ORG References: <3E1362FD.6070001@acm.org> <3E13CCF1.FA78AD5D@mindspring.com> <3E149EAF.9040100@acm.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="9zSXsLTf0vkW971A" Content-Disposition: inline In-Reply-To: <3E149EAF.9040100@acm.org> Organization: United Federation of Planets Reply-By: Thu Jan 9 15:34:12 EST 2003 X-Message-Flag: Put no trust in cryptic comments. X-PGP-Key: http://www.ufp.org/~bicknell/ Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --9zSXsLTf0vkW971A Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In a message written on Thu, Jan 02, 2003 at 12:18:55PM -0800, Tim Kientzle= wrote: > rc.conf is _not_ a list of variable=3Dvalue > pairs. It is a shell script that sets > a number of shell variables. Nothing > less than a full-fledged implementation > of /bin/sh is gauranteed to work in all > cases. Might it be worth restricting rc.conf to be a (very small?) subset of sh syntax so that it remains both a valid sh script and also easier to parse in a program? Clearly things like the end of /etc/defaults/rc.conf would have to be handled differently, but that might be a good trade off to make the file more easily parseable in many languages. --=20 Leo Bicknell - bicknell@ufp.org - CCIE 3440 PGP keys at http://www.ufp.org/~bicknell/ Read TMBG List - tmbg-list-request@tmbg.org, www.tmbg.org --9zSXsLTf0vkW971A Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.4 (FreeBSD) Comment: For info see http://www.gnupg.org iD8DBQE+FKiSNh6mMG5yMTYRAtofAJ0RD/rVZomG5yuwtlWXPNc6PJPpTwCfQ7Wn Gv/7b1YXr6oydwLgCJ2Ybxw= =d13g -----END PGP SIGNATURE----- --9zSXsLTf0vkW971A-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message