help-cfengine
[Top][All Lists]
Advanced

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

Re: files actions


From: David E. Nelson
Subject: Re: files actions
Date: Tue, 28 Sep 2004 17:12:00 -0500 (CDT)


Hi Ed,

Just thought of something. How about:

groups:

  SystemExists = ( FileExists(/etc/system) )

control:

  actionsequence = ( files )

files:

  !SystemExists::

    /etc/system
      owner=root
      group=other
      mode=0644
      action=touch

  !SystemExists
    /etc/system
      owner=root
      group=other
      mode=644
      action=fixplain

Regards,
         /\/elson


On Tue, 28 Sep 2004, Ed Brown wrote:

Hmmm, so NO easy answer I take it....

If you care enough to create a file, with particular permissions, if it
doesn't exist, why wouldn't also want to verify the permissions on the
existing file, or continue to verify, as the case may be?   Seems like
an odd omission, one that I was surprised to find that neither 'fixall'
or 'create' encompasses.   Touching a file every time cfengine runs is
clearly not the right solution.

Any chance of addressing this in the future?

thanks,
Ed


On Tue, 2004-09-28 at 11:18, Ed Brown wrote:
There's probably an easy answer, but at the moment it is eluding me: how
can a file be both created if missing, and have its modes/ownership
verified?  action=create does one, action=fixall does the other,
action=touch gets close, but I don't want the file to be touched
(timestamp updated) every time cfagent runs.

thanks,
Ed



_______________________________________________
Help-cfengine mailing list
Help-cfengine@gnu.org
http://lists.gnu.org/mailman/listinfo/help-cfengine



_______________________________________________
Help-cfengine mailing list
Help-cfengine@gnu.org
http://lists.gnu.org/mailman/listinfo/help-cfengine


--
~~ ** ~~  If you didn't learn anything when you broke it the 1st ~~ ** ~~
                        time, then break it again.



reply via email to

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