Date: Fri, 16 Apr 2004 16:01:21 +0930 From: "Daniel O'Connor" <doconnor@gsoft.com.au> To: freebsd-hackers@freebsd.org Cc: Craig Rodrigues <rodrigc@crodrigues.org> Subject: Re: C code for parsing rc.conf? Message-ID: <200404161601.21446.doconnor@gsoft.com.au> In-Reply-To: <407F73C8.8090306@kientzle.com> References: <20040414215601.GA3923@crodrigues.org> <B0676729-8EA5-11D8-9EC1-000A9590A44E@ucdavis.edu> <407F73C8.8090306@kientzle.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200404161601.21446.doconnor>