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