Re: When to update config files...
Dale Scheetz writes ("When to update config files..."):
> In preparing the pine debian.postinst script to configure pine with the
> default NNTP server I looked at the way this script deals with mailname
> to see when to modify pine.conf. I was surprised to find that the
> decision is made based on whether mailname equals the system hostname!
> This doesn't seem to me to be valid criterion for this decision.
> [ discussion ]
That's right, I don't think it is.
If you have a config file that needs to be changed on most
installations (and I think this is the case for Pine) then you should
not distribute a version of the file in the package and list it as a
Instead you should have the postinst generate a suitable file from a
template if there is no file there already.
If changes need to be made to the settings in the file you have to
change the template and/or the way it's generated, and also to put
code in the postinst that will modify an existing file to bring it up
For an example of how to do this kind of thing see the Smail package.
> The main thrust of this long-winded bleat is, why isn't it appropriate to
> ask the installer for permission to modify pine.conf?
Because the installer might answer `no' :-). Seriously: if you write
your code well it will do a better job of deciding what the right
thing is than the average user.
The best way to do this is to isolate the bit you might want to
change, check that it has the (broken) configuration you expect to
find, and then replace that bit with a correct configuration.