Created
December 16, 2013 18:31
-
-
Save teroka/7991878 to your computer and use it in GitHub Desktop.
rewriting docs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright (C) Cfengine AS | |
# This file is part of Cfengine 3 - written and maintained by Cfengine AS. | |
# This program is free software; you can redistribute it and/or modify it | |
# under the terms of the GNU General Public License as published by the | |
# Free Software Foundation; version 3. | |
# This program is distributed in the hope that it will be useful, | |
# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
# GNU General Public License for more details. | |
# You should have received a copy of the GNU General Public License | |
# along with this program; if not, write to the Free Software | |
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA | |
# To the extent this program is licensed as part of the Enterprise | |
# versions of Cfengine, the applicable Commercial Open Source License | |
# (COSL) may apply to this file if you as a licensee so wish it. See | |
# included file COSL.txt. | |
#+begin_src cfengine3 | |
body common control | |
{ | |
bundlesequence => { "example" }; | |
} | |
bundle agent example | |
{ | |
classes: | |
"do_it" and => { accessedbefore("/tmp/earlier","/tmp/later"), "linux" }; | |
reports: | |
do_it:: | |
"The secret changes have been accessed after the reference time"; | |
} | |
#+end_src | |
############################################################################### | |
#+begin_src example_output 3.6- | |
2013-12-16T20:29:44+0200 notice: /default/example: R: The secret changes have been accessed after the reference time | |
#+end_src |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
layout: default | |
title: accessedbefore | |
categories: [Reference, Functions, accessedbefore] | |
published: true | |
alias: reference-functions-accessedbefore.html | |
tags: [reference, files functions, functions, accessedbefore] | |
--- | |
[%CFEngine_function_prototype(newer,older)%] | |
**Description:** Compares the `atime` fields of two files. | |
Return true if `newer` was accessed before `older`. | |
[%CFEngine_function_attributes(newer, older)%] | |
**Example:** | |
[%CFEngine_include_snippet(accessedbefore.cf, #\+begin_src cfengine3, .*end_src)%] | |
Output: | |
[%CFEngine_include_snippet(accessedbefore.cf, #\+begin_src\s+example_output\s*[ ,.0-9]+, .*end_src)%] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment