Re: should a postinst script create config files?
On Thu, Feb 21, 2002 at 05:38:29PM +0100, Maik Busch wrote:
> Hello,
>
> is it a good way to create config files with postinst scripts? I allways
> have some machines show a different behavior because i installed them
> with different postinsts. For example the /etc/ssh/sshd_config: there
> was a change in the ForwardX11 option, and i didn't recognised it
> because in the scripts is allways something like if [ ! -e <conffile> ];
> then <create file with contents of script>; fi. I don't have any chance
> to recongnise the change in the config script! Okay I can read
> changes.gz, but for all packeges!!?
>
> I think creating files in that way is very dirty and we should try to
> avoid that. They should be shipped as _real_ config files in a deb
> package.
Just for the record, the problem with including it with a conffile
(as you seem to imply), is that when the ForwardX11 option
changes the system adminstrator has to decide which version of the
file to install.
If he/she picks don't install new file, then sshd is started with
the old value of ForwardX11, until the adminstrator can/remembers
to merge in the change.
If he/she picks the new value, then sshd is started with the default
policy, not the local policy. It is up to the system adminstrator to
merge the changes together.
In either case, if the system adminstrator is doing an "apt-get
dist-upgrade", there may be a delay before he/she can fix the
problem after sshd has started.
This isn't so much a problem with sshd, but once I answered Yes to
updating /etc/squid.conf. I intended to merge in my changes.
To my surprise and horror, this not only set my cache size to a tiny
100Megs (IIRC), but also automatically started squid, and squid
proceeded to purge items from my cache in order to make it the reduced
size. No! No! No! I don't wont that!
Perhaps dpkg really needs an option: I want to use *that* file, but
please let me edit it before blindly using it! Please remind me if
I forget to edit it!
Reply to: