Location of CFEngine Inputs on Debian Systems

The first few times I used CFEngine on a Debian GNU/Linux system I ran into strange eror messages while updating the inputs. I used some code examples for update.cf:

"/var/lib/cfengine3/inputs"
    perms => system("600"),
    copy_from => mycopy("$(master_location)","localhost"),
    depth_search => recurse("inf"),
    action => immediate;

See here for the complete example. The only change I made was to adapt the code to the location of the CFEngine system files that are located under /var/lib/cfengine3 on Debian systems. Still, it gave me mysterious errors about recursive security issues.

The error is caused by a small difference in theĀ  file locations on Debian systems: inputs are located in the /etc/cfengine3 directory and /var/lib/cfengine3/inputs is not a directory but a symbolic link to /etc/cfengine3. After I changed line no. 1 in above code to point to the real directory “/etc/cfengine3”, everything started to run smoothly!

Tip: Ubuntu systems are identical to Debian in this respect.

Advertisements