Deleting a file/directory on startup
Till Maas
opensource at till.name
Tue Jan 15 11:08:26 UTC 2008
On Mon January 14 2008, Casey Dahlin wrote:
> The most correct way is to put some content in the lockfile to allow it
> to be determined if it is valid. Then pm-utils itself can figure it out
> when its run.
How can this be done in a bullet-proof way[1]? Also it seems to be a lot more
complicated than just to make sure, that the lockdirectory is removed on
startup (and there are already a lot of files and directories that are
removed on startup by rc.sysinit, so it is more a common way to do it).
The best way I know would be to be able to identify whether or not a system
was rebooted since a file was created, but given there are systems that do
not have a hardware clock, I do not know of a way to identify it. Is there,
e.g. a file in /proc or /sys that will have a unique content that only
changes every time a system is powered up?
Regards,
Till
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 827 bytes
Desc: This is a digitally signed message part.
URL: <http://listman.redhat.com/archives/fedora-devel-list/attachments/20080115/6bfcc16f/attachment.sig>
More information about the fedora-devel-list
mailing list