Subject: Re: generating /etc/rc.conf from /etc/defaults/rc.conf
To: None <thorpej@zembu.com>
From: Tracy J. Di Marco White <gendalia@iastate.edu>
List: netbsd-users
Date: 10/07/2000 17:21:05
}On Sat, Oct 07, 2000 at 01:34:08AM +0200, Hubert Feyrer wrote:
}
} > I got bored while updating my 1.5 machine tonight, and wrote a little
} > script that helps in generating /etc/rc.conf from /etc/defaults/rc.conf
} > (and already existing defaults in /etc/rc.conf). Right now it does not
} > handle ifconfig_* right, and writes it's output to /tmp/rc.conf.new.
} > 
} > If someone wants to play with it or continue working on it:
} > 
} > -> http://www.feyrer.de/Misc/rc_conf
}
}What is the point of this?  rc.conf is supposed to source in the
}defaults first, that way when you upgrade your system, you get sane
}defaults for new rc.d scripts that appear, without having to manually
}edit your configs.

I don't know that what I do would make much more sense, but what I do
is create a /etc/local directory that contains the same things as
/etc/default.  The files in /etc/local only contain settings that
differ from the files in /etc/default.  /etc/rc.conf has this:
if [ -r /etc/local/rc.conf ]; then
        . /etc/local/rc.conf
fi

}In light of this, "make install" when doing a build should install new
}rc scripts and /etc/defaults/* defaults.

I'd say make build should only do this if it also warns or does something
about existing files in /etc/rc.d that are no longer in the source tree.
While they could be local modifications, systemfs is a good example of
something that should have been cleaned out of /etc/rc.d along the way,
as it cleaned up /var/run after things started writing in it.

I think /etc/defaults should also be part of the information that is
backed up by /etc/security's nightly run.  That way "make install"'s
changes would result in mail being sent that night listing the changes
made.  And maybe rc.d should be in that too.

Tracy J. Di Marco White
Project Vincent Systems Manager
gendalia@iastate.edu