Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 2 Jan 2003 13:52:36 -0800
From:      Jordan K Hubbard <jkh@queasyweasel.com>
To:        Terry Lambert <tlambert2@mindspring.com>
Cc:        wgrim@siue.edu, phk@FreeBSD.ORG, kientzle@acm.org, freebsd-hackers@FreeBSD.ORG
Subject:   Re: Reading rc.conf from C programs?
Message-ID:  <8183059A-1E9C-11D7-883C-000393BB9222@queasyweasel.com>
In-Reply-To: <3E14B087.EC43701B@mindspring.com>

next in thread | previous in thread | raw e-mail | index | archive | help
You're somewhat mistaken if you think there was EVER any defined policy 
with respect to this, it was simply a shell configuration file that 
gained prominance as it went along, from its humble beginnings as 
/etc/sysconfig or whatever it was we called it back then.  There was 
never any specific mandate that it be a key/value pair configuration 
variable database, that was simply a de-facto standard and one which 
was never clearly documented.

In hindsight, if we'd really wanted a key/value pair database then we 
should have done it in XML and simply dealt with it at arm's length 
through a accessor utility, e.g.  instead of:

         case ${ipsec_enable} in

We'd have:

        case `sysconfig -r ipsec_enable` in

Or something to that effect.

If you're really looking for "the real solution" underlying this 
problem then you need to look past the format being used at the moment 
and at the fundamental problem it was originally trying to solve.

- Jordan

On Thursday, January 2, 2003, at 01:35 PM, Terry Lambert wrote:

> wgrim@siue.edu wrote:
>> Well, perhaps I'm missing something here, but can't you just tokenize 
>> the items
>> in rc.conf using strtok after opening up the file in your C program?
>
> You are missing something.  Someone violated policy, and put
> shell code into rc.conf, instead of leaving it a name/value
> pairs.
>
> -- Terry
>
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-hackers" in the body of the message
>
--
Jordan K. Hubbard
Engineering Manager, BSD technology group
Apple Computer


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?8183059A-1E9C-11D7-883C-000393BB9222>