Re: Mystery: disappearing .mailfilterrc
On Fri, Oct 24, 2003 at 01:29:09AM +0100, Pigeon wrote:
> On Thu, Oct 23, 2003 at 12:11:18AM -0700, Ross Boylan wrote:
> > In the last week I have twice rebooted, and each time my .mailfilterrc
> > AND its backup in an RCS directory have disappeared. Does anyone have
> > any ideas what could be causing this truly bizarre behavior?
> >
> > I know the file was there because a) I checked and b) mailfilter ran
> > fine before the reboot.
> >
> > I run mailfilter from the preconnect of fetchmail. fetchmail is
> > invoked by the /etc/ppp/ip-up.d/fetchmail script. It runs as user
> > fetchmail.
> >
> > The file is in /var/run/fetchmail/.mailfilterrc with RCS in
> > /var/run/fetchmail/RCS/. Thr RCS directory itself does survive the reboot.
> > The files clearly survive having the ppp connection closed down and
> > restarted (that is, once I get them in place).
> >
> > /var is a Reiser file system on an LVM volume in an EVMS container. I
> > noticed no error messages on boot up, nor do I see any in the log
> > (though the log has fewer messages than showed on the screen).
>
> Have you clocked this message:
>
> Clearing: /tmp /var/lock /var/run.
>
> /var/run is not a place to put things that you want to survive a
> reboot...
Aha! Thanks for the tip.
I don't see that in my logs, and haven't noticed it on my screen.
But I think I found the code in init.d/bootmisc.sh.
#
# Clean up /var/run in the same way as /var/lock,
# and create /var/run/utmp so that we can login.
#
[ "$VERBOSE" != no ] && echo -n "/var/run"
( cd /var/run && \
find . ! -type d ! -name utmp ! -name innd.pid ! -name pump.sock \
! -newer /proc -exec rm -f -- {} \; )
Is this behavior specified in the FHS? somewhere else?
I guess I better move the files.
And it still seems mysterious that one of my files in /var/run
(mailfilterlog) survived this test. I'm not sure why. If it got
touched immediately after startup it would be safe, but I don't think
anything would touch it (since it only runs when ppp goes up).
Reply to: