help-cfengine
[Top][All Lists]
Advanced

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

files create and fix action question


From: Frank Smith
Subject: files create and fix action question
Date: Fri, 04 Nov 2005 11:23:37 -0600
User-agent: Thunderbird 1.4.1 (X11/20051006)

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?

Thanks,
Frank

-- 
Frank Smith                                      address@hidden
Sr. Systems Administrator                       Voice: 512-374-4673
Hoover's Online                                   Fax: 512-374-4501




reply via email to

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