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

Re: Stop apt-get upgrade from messing with fetchmailrc?



On Sat, Jun 23, 2001 at 03:33:52PM +0200, Mart van de Wege wrote:
> Folks,
> 
> I have yet another minor question. I thought to be smart to add a line to
> my pcmcia network startup script to start up fetchmail (in daemon mode) on
> my laptop whenever I plug in the network card. It works great, it just
> runs every 15 minutes during the night, downloading all my mail, and it
> shuts down properly when I unplug in the morning, so I can read my mail on
> the train while commuting to work.
> However I woudn't be posting if I didn't have a problem: whenever I do an
> apt-get upgrade on the laptop, and fetchmail gets upgraded (about 3 times
> last week, running sid), the postinst script detects an existing
> /etc/fetchmailrc and promptly chowns it fetchmail.root and installs
> fetchmail in /etc/init.d. My fetchmail that runs from the pcmcia script
> then starts complaining to the syslog that it doesn't own the fetchmailrc
> file, and the other fetchmail daemon starts complaining about not finding
> the POP servers when I unplug it.
> I am getting a little tired of doing update-rc.d -f fetchmail remove and
> chown root.root /etc/fetchmailrc after every upgrade. So here's the
> question: is it enought to just rename the fetchmailrc file, or is there
> another way of stopping the postinst script of messing with my config? I
> seem to remember it's policy that packages shouldn't mess with local
> versions of config files, hence my question.

Maybe I can help with part of you're problem.  From "man update-rc.d" -

       If  any  files  /etc/rcrunlevel.d/[SK]??name already exist
       then update-rc.d does nothing.  This is so that the system
       administrator  can rearrange the links, provided that they
       leave at least one link remaining,  without  having  their
       configuration overwritten.

It looks like you could leave one of the "K" links and on subsequent 
upgrades the links wouldn't be upgraded.

As far as /etc/fetchmailrc being chowned to root.  I would think that is the 
way it should be.  With very few exceptions, in /etc,  most are root.root.  
I suspect what you could do is cp /etc/fetchmailrc to ~/.fetchmailrc
Set the owner and group to that of you're home directory and -
$ chmod 600 .fetchmailrc
hth,
kent

-- 
 From seeing and seeing the seeing has become so exhausted
     First line of "The Panther" - R. M. Rilke




Reply to: