Re: Deleting a file/directory on startup

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

 



On 11/01/2008, Till Maas <opensource@xxxxxxxxx> wrote:
> Hiyas,
>
> a package I comaintain (pm-utils) uses a lockfile. Because it may happen that
> the computer crashes when the program is used, the lockfile may be there
> already when no instance of pm-utils is running. Therefore the lockfile
> should be deleted on startup. Do I need to write an initscript for this?
> Which is imho not 100% correct, because this "service" should never be
> deactivated. Is there a directory , where one could drop a file for this? The
> only one I can think of would be /etc/sysconfig/modules, where ever .modules
> file is executed at startup. The original feature request to split up
> rc.sysinit in a rc.sysinit.d structure is more than five years old (which
> would be a good solution here), so I doubt that filing a feature request will
> help here. But maybe someone knows a better solution that the two I can think
> of.

Have a look at the logic used in the fail2ban init file - the start
operation checks for a running fail2ban process. If non is found, it
is safe to delete the lock file.

As it happens, I just noticed that dovecot doesn't properly handle
this situation either.

-- 
fedora-devel-list mailing list
fedora-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-devel-list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux