Re: should a postinst script create config files?
>>"Maik" == Maik Busch <maik.busch@web.de> writes:
Maik> is it a good way to create config files with postinst scripts?
Maik> I think creating files in that way is very dirty and we should try to
Maik> avoid that. They should be shipped as _real_ config files in a deb
Maik> package.
Does this meet the requirements?
======================================================================
NAME
ucf - Update Configuration File: preserve user changes in
config files
SYNOPSIS
ucf [options] <New file> <Destination>
DESCRIPTION
This script attempts to provide conffile like handling for
files installed under /etc not shipped in a Debian pack
age, but handled by the postinst instead. Debian policy
states that files under /etc which are configuration files
must preserve user changes, and this applies to files han
dled by maintainer scripts as well. Using ucf, one may
ship a bunch of default configuration files somewhere in
/usr ( /usr/share/<pkg> is a good location), and maintain
files in /etc, preserving user changes and in general
offering the same facilities while upgrading that dpkg
normally provides for "conffiles"
Additionally, this script provides facilities for transi
tioning a file that had not been provided conffile like
protection to come under this schema, and attempts to min
imize questions asked at install time. Indeed, the transi
tioning facility is better than the one offered by dpkg
while transitioning a file from a non-conffile to conffile
status.
======================================================================
manoj
--
The Roman Rule: The one who says it cannot be done should never
interrupt the one who is doing it.
Manoj Srivastava <srivasta@debian.org> <http://www.debian.org/%7Esrivasta/>
1024R/C7261095 print CB D9 F4 12 68 07 E4 05 CC 2D 27 12 1D F5 E8 6E
1024D/BF24424C print 4966 F272 D093 B493 410B 924B 21BA DABB BF24 424C
Reply to: