Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 02 Jan 2003 13:30:52 -0800
From:      Terry Lambert <tlambert2@mindspring.com>
To:        kientzle@acm.org
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: Reading rc.conf from C programs?
Message-ID:  <3E14AF8C.E78071FF@mindspring.com>
References:  <3E1362FD.6070001@acm.org> <3E13CCF1.FA78AD5D@mindspring.com> <3E149EAF.9040100@acm.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3E14AF8C.E78071FF>