Setup of default configuration files

Max Bowsher
Tue Jan 7 18:42:00 GMT 2003

Christopher Faylor wrote:
> On Tue, Jan 07, 2003 at 02:12:04PM -0000, Max Bowsher wrote:
>> I think that for maximum immediate gain, it is worth considering
>> this: Patch generic-build-script and mknetrel to detect certain files
>> (/usr/info/*.info and /etc/defaults/*) in a package, and add a
>> postinstall script if found. Note that then any package containing
>> info or defaults files will contain /etc/postinstall/
>> or This has the rather convenient effect that if
>> multiple packages with these are installed at once, the scripts will
>> overwrite each other, with the action only being performed once.
> I'm not going to patch mknetrel.  The logical place to handle this is
> in the one single point of control that is guaranteed to be used by
> everyone.  You're suggesting that two people change their packages and
> other people (like Corinna for instance) change their behavior.  To me
> the obvious solution isn't inconveniencing a bunch of people, it is
> adding the functionality to setup.exe.

I was thinking that *whilst* the package maintainers were making
arrangements to add a file to /etc/defaults, it would be trivial for them to
add one to /etc/postinstall as well.

But never mind. Let's discuss how to make setup.exe do this.

I think we need the auto-trigger stuff in a new package in Base, so updates
can be made independently of setup version. Aside from that, I guess we
create /etc/setuptriggers, to contain the .sh files, and then need some way
to associate glob pattern with the sh scripts. Either an index file, or
maybe a kind of secondary shebang line in the scripts (e.g. #?
/etc/defaults/*). Also, there is the matter of how to tell scripts the names
of newly installed matching files (stdin, one per line?). One little
complication is that setup will need to hold the list of every file it has
installed in memory until it processes the triggers (otherwise, what if the
setuptriggers package is updated at the same time as a package that needs
it. Or first installs, as well.)



More information about the Cygwin-apps mailing list