[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Standards for Configuration Scripts?



David H. Silber:
> Do we have a standard user-interface model for configuration scripts which
> will be run from dpkg?  How about for scripts that might be run again later?

There is a bunch of info covering this in /usr/doc/dpkg.

> One general consensus seems to be to name these as `<package-name>config'.
> Is that a standard, or are people just being consistent?

I'm not sure where this came from, but it is related to a couple of
issues I've been meaning to raise.

First, when I was trying to decipher dpkg's workings and figure out
how to package shared libraries safely, I had a hard time remembering
which scripts could get called with which arguments, especially when
dpkg would try to recover from errors.  Ian Jackson, how would you
feel about modifying dpkg to support an alternative approach where a
single, super script replaced the preinst, postinst, prerm and postrm
scripts?  I can't speak for others, but I would find it much easier to
visualize the entire process, if everything was done by one script
which was called with the appropriate arguments for each stage of
package installation/removal.

Second, what do you think of giving the new package's script(s) first
crack at handling each stage?  This would make it easier to handle
situations like we have right now with ncurses3.0 where the currently
installed prerm script will hose the system if it is run.

David
-- 
David Engel                        Optical Data Systems, Inc.
david@ods.com                      1101 E. Arapaho Road
(214) 234-6400                     Richardson, TX  75081


Reply to: