C code for parsing rc.conf?
Daniel O'Connor
doconnor at gsoft.com.au
Thu Apr 15 23:31:57 PDT 2004
On Fri, 16 Apr 2004 15:18, Tim Kientzle wrote:
> > The shell's environment will be exported to your program's environment.
>
> Not quite. This approach gives you the rc.conf settings
> intermingled with the rest of the environment, which is
> probably not what you want.
>
> (It's okay if you're just testing a few particular
> rc.conf settings, but if you want to collect an accurate
> list of all rc.conf settings, it won't do.)
And it still only gives you read-only access to shell-trick mangled
parameters.
I suspect those are pretty rare and a parser which noted which parameters it
couldn't parse and reproduced them verbatim out write-out would probably be
OK.
--
Daniel O'Connor software and network engineer
for Genesis Software - http://www.gsoft.com.au
"The nice thing about standards is that there
are so many of them to choose from."
-- Andrew Tanenbaum
GPG Fingerprint - 9A8C 569F 685A D928 5140 AE4B 319B 41F4 5D17 FDD5
More information about the freebsd-hackers
mailing list