[Top][All Lists]

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

Re: files create and fix action question

From: Paul Krizak
Subject: Re: files create and fix action question
Date: Fri, 04 Nov 2005 11:35:14 -0600
User-agent: Mozilla Thunderbird 1.0.7 (X11/20050923)

Does action=fixall do what you want?

Paul Krizak                         5900 E. Ben White Blvd. MS 625
Advanced Micro Devices              Austin, TX  78741
Linux/Unix Systems Engineering      Phone: (512) 602-8775
Microprocessor Solutions Sector

Frank Smith wrote:
I'm trying to make a files action that will create a file if it
doesn't exist or will fix ownership if it does exist but is wrong.

action=create can do the first
action=fixplain can do the second

However, if I use both a create and fixplain action, only the first
one in the config actually does anything, cfengine's file locking
prevents the second one from running.  So if the create action is
first, it will create it if not there but will not fix it if it is.
Conversely, if the fixplain is first it will fix ownerships if it is
wrong, but it will never create the file if it isn't there (the fix
action sets a lock even if the file to fix doesn't exist, so a create
won't happen because the non-existant file is locked).

action=touch will do what I want, except that it changes the timestamp
of the file on every run whether it changes anything or not (which is
what I would expect a touch to do, but not what I want)

Is there some option I've missed that could achieve both a create and
a fix and do whichever one is needed?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]