/etc/rc.conf, take 46!

1999-03-21 Thread Jordan K. Hubbard
OK, so it seems everyone's found something to like and dislike about the new scheme. In that regard, it seems pretty much equivalent to the previous layout when that was first introduced. :) However, incremental refinement for this stuff has always been the order of the day, so in that spirit, he

RE: /etc/rc.conf, take 46!

1999-03-21 Thread John Baldwin
On 22-Mar-99 Jordan K. Hubbard wrote: > OK, so it seems everyone's found something to like and dislike about > the new scheme. In that regard, it seems pretty much equivalent to > the previous layout when that was first introduced. :) If it makes you feel any better, I kind of like the new system

Re: /etc/rc.conf, take 46!

1999-03-21 Thread Jordan K. Hubbard
The problem with putting code in /etc/defaults/rc.conf is that simplistic parsers which read it as ``var = value # optional comment'' get very confused by for loops or function declarations or what have you. It also makes it more difficult to read in /etc/{*,.}rc.conf from an admin program, permut

Re: /etc/rc.conf, take 46!

1999-03-22 Thread Richard Wackerbarth
On Sun, 21 Mar 1999, Jordan K. Hubbard wrote: > Index: netstart > === > RCS file: /home/ncvs/src/etc/netstart,v > retrieving revision 1.53 > diff -u -u -r1.53 netstart > --- netstart 1999/02/10 18:08:16 1.53 > +++ netstart 1999/0

Re: /etc/rc.conf, take 46!

1999-03-22 Thread Daniel C. Sobral
Forget about code in rc.conf. Put the logic in the the scripts. Or, better, put the logic in rc.suck (well, find a better name... :), and . /etc/rc.suck instead. "Jordan K. Hubbard" wrote: > > OK, so it seems everyone's found something to like and dislike about > the new scheme. In that regard,

Re: /etc/rc.conf, take 46!

1999-03-22 Thread John Baldwin
On 22-Mar-99 Richard Wackerbarth wrote: > There is a problem with this approach. > > /etc/defaults/rc.conf defines ${rc_conf_files} > However, I have no chance to override it before it is used. > > When I wrote my comment about "code" in rc.conf, I was > actually thinking about /etc/defaults/rc.

Re: /etc/rc.conf, take 46!

1999-03-22 Thread Richard Wackerbarth
On Mon, 22 Mar 1999, John Baldwin wrote: > > On 22-Mar-99 Richard Wackerbarth wrote: > > There is a problem with this approach. > > > > /etc/defaults/rc.conf defines ${rc_conf_files} > > However, I have no chance to override it before it is used. > > > > However, I fear that you need a bit more

Re: /etc/rc.conf, take 46!

1999-03-22 Thread Daniel C. Sobral
Richard Wackerbarth wrote: > > When I wrote my comment about "code" in rc.conf, I was > actually thinking about /etc/defaults/rc.conf and the > recursion loop that that creates when someone copies it to > /etc/rc.conf. > > You can, and IMHO should, make the defaults strictly variables. > > Howev

Re: /etc/rc.conf, take 46!

1999-03-22 Thread John Baldwin
On 22-Mar-99 Richard Wackerbarth wrote: > On Mon, 22 Mar 1999, John Baldwin wrote: > >> >> On 22-Mar-99 Richard Wackerbarth wrote: >> > There is a problem with this approach. >> > >> > /etc/defaults/rc.conf defines ${rc_conf_files} >> > However, I have no chance to override it before it is used

Re: /etc/rc.conf, take 46!

1999-03-22 Thread Daniel C. Sobral
John Baldwin wrote: > > However, the original definition has already been used once the /etc/rc.conf > has been read. Unless you are going to call the for loop twice, once after > /etc/defaults/rc.conf to include /etc/rc.conf and once after /etc/rc.conf to > include the extra stuff you define, yo

Re: /etc/rc.conf, take 46!

1999-03-22 Thread John Baldwin
On 22-Mar-99 Daniel C. Sobral wrote: > John Baldwin wrote: >> >> However, the original definition has already been used once the /etc/rc.conf >> has been read. Unless you are going to call the for loop twice, once after >> /etc/defaults/rc.conf to include /etc/rc.conf and once after /etc/rc.conf

Re: /etc/rc.conf, take 46!

1999-03-22 Thread Richard Wackerbarth
On Mon, 22 Mar 1999, John Baldwin wrote: > > An alternate, and perhaps cleaner approach would be to always suck in > > /etc/defaults/rc.conf and /etc/rc.conf. Then suck in those files specified > > in ${additional_rc_conf_files}. > > That would work, but then we have two includes everywhere that

Re: /etc/rc.conf, take 46!

1999-03-22 Thread Daniel C. Sobral
John Baldwin wrote: > > >#!/bin/sh > > for file in $1 > > do > >. $file > >if [ "${rc_conf_files}X" != "$*X" ] then > > . $0 "${rc_conf_files}" > >fi > > done > > I would move the if-statemeount outside the for loop. Say config file a > defines > rc_conf_files="b c", and config

RE: /etc/rc.conf, take 46!

1999-03-22 Thread paul
> -Original Message- > From: Richard Wackerbarth [mailto:r...@dataplex.net] > Sent: 22 March 1999 10:23 > To: John Baldwin > Cc: curr...@freebsd.org; Jordan K. Hubbard > Subject: Re: /etc/rc.conf, take 46! > > > On Mon, 22 Mar 1999, John Baldwin wrote: >

Re: /etc/rc.conf, take 46!

1999-03-22 Thread Chas
Now that sounz like a simple solution.:)) Paul... > > Unless someone comes up with a scheme that tracks set membership and > > allows us to add to that set, I think that we should stick to > > the "simple" > > approach. > > > > /etc/defaults/rc.conf defines ${rc_conf_files} to be "/etc/rc.conf" >

Re: /etc/rc.conf, take 46!

1999-03-23 Thread Sheldon Hearn
On Sun, 21 Mar 1999 18:06:41 PST, "Jordan K. Hubbard" wrote: > if [ -f /etc/defaults/rc.conf ]; then > . /etc/defaults/rc.conf > -elif [ -f /etc/rc.conf ]; then > - . /etc/rc.conf > + for i in ${rc_conf_files}; do > + if [ -f $i ]; then > + . $i > +

Re: /etc/rc.conf, take 46!

1999-03-23 Thread Sheldon Hearn
On Tue, 23 Mar 1999 12:49:52 +0200, Sheldon Hearn wrote: > What's the idea behind ignoring rc_conf_files just because we can't find > /etc/defaults/rc.conf? Please pretend I never said that. Ciao, Sheldon. To Unsubscribe: send mail to majord...@freebsd.org with "unsubscribe freebsd-current"

Re: /etc/rc.conf, take 46!

1999-03-23 Thread Matthew D. Fuller
On Tue, Mar 23, 1999 at 12:49:52PM +0200, a little birdie told me that Sheldon Hearn remarked > On Sun, 21 Mar 1999 18:06:41 PST, "Jordan K. Hubbard" wrote: > > > if [ -f /etc/defaults/rc.conf ]; then > > . /etc/defaults/rc.conf > > -elif [ -f /etc/rc.conf ]; then > > - . /etc/rc.conf > > +

Re: /etc/rc.conf, take 46!

1999-03-23 Thread RT
.org Date: Monday, March 22, 1999 5:12 PM Subject: Re: /etc/rc.conf, take 46! >Now that sounz like a simple solution.:)) Paul... >> > >> > An alternate, and perhaps cleaner approach would be to always suck in >> > /etc/defaults/rc.conf and /etc/rc.conf. Then su