Uploaded image for project: 'CFEngine Community'
  1. CFEngine Community
  2. CFE-54

sys variable to policy path

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Rejected
    • Priority: Medium
    • Resolution: Won't Do
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Built-in functions
    • Labels:
      None

      Description

      $(sys.policy_path) that gets populated with the absolute path of the policy entry file being run.

      1) For unrooted paths (cf-agent -f policy.cf) this will always be /var/cfengine/inputs
      2) For relative and absolute paths (cf-agent -f ./policy.cf and cf-agent -f /tmp/policy.cf) the variable gets populated
      with the absolute path directory path to the policy file.

      This is eg. for use in lsdir, readstringarray etc. where absolute path is required, but cumbersome today because of your
      policy files change location (eg. from testing directories) you will need to update the paths for all internal functions too.
      Instead you could use the $(sys.policy_path) variable.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                a10007 Jon Henrik Bjørnstad (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Summary Panel