Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 01 Jan 2003 18:00:39 -0800
From:      Greg Shenaut <greg@bogslab.ucdavis.edu>
To:        hackers@FreeBSD.ORG
Subject:   Re: Reading rc.conf from C programs? 
Message-ID:  <200301020200.h0220dx78981@thistle.bogs.org>
In-Reply-To: Your message of "Wed, 01 Jan 2003 18:24:40 EST." <20030101181840.P29988-100000@april.chuckr.org> 

next in thread | previous in thread | raw e-mail | index | archive | help
In message <20030101181840.P29988-100000@april.chuckr.org>, Chuck Robey cleopede:
>On Thu, 2 Jan 2003, Matthew West wrote:
>
>> On Wed, Jan 01, 2003 at 01:51:57PM -0800, Tim Kientzle wrote:
>> > I'm trying to figure out how to read and use /etc/rc.conf
>> > configuration variables from within a C program.

One off the wall way:

	#!/bin/sh

	set -a
	. /etc/rc.conf
	exec /your/program

Greg Shenaut

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?200301020200.h0220dx78981>