From owner-freebsd-hackers Thu Jan 2 13:32:24 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 C255237B401 for ; Thu, 2 Jan 2003 13:32:23 -0800 (PST) Received: from puffin.mail.pas.earthlink.net (puffin.mail.pas.earthlink.net [207.217.120.139]) by mx1.FreeBSD.org (Postfix) with ESMTP id 335C143EC5 for ; Thu, 2 Jan 2003 13:32:23 -0800 (PST) (envelope-from tlambert2@mindspring.com) Received: from pool0545.cvx40-bradley.dialup.earthlink.net ([216.244.44.35] helo=mindspring.com) by puffin.mail.pas.earthlink.net with asmtp (SSLv3:RC4-MD5:128) (Exim 3.33 #1) id 18UCwu-0002X5-00; Thu, 02 Jan 2003 13:32:21 -0800 Message-ID: <3E14AF8C.E78071FF@mindspring.com> Date: Thu, 02 Jan 2003 13:30:52 -0800 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: kientzle@acm.org Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Reading rc.conf from C programs? References: <3E1362FD.6070001@acm.org> <3E13CCF1.FA78AD5D@mindspring.com> <3E149EAF.9040100@acm.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-ELNK-Trace: b1a02af9316fbb217a47c185c03b154d40683398e744b8a497d34aacdd2dc69fca8ceecfd232e884350badd9bab72f9c350badd9bab72f9c350badd9bab72f9c 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 Tim Kientzle wrote: [ ... simple script ... ] > This doesn't work. /etc/rc.conf does not export > its variables to the environment. It only sets them in the > local shell. Try the above where 'fred' is > #!/bin/sh > printenv > and you'll see what I mean. Someone else has already pointed out "set -e". > rc.conf is _not_ a list of variable=value > 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. Then this is broken, and needs to be fixed, not worked around by adding the ability to interpret the code that shouldn't be there. -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message