linux - Customize CFEngine3 temporary downloaded files location -
i facing issue while trying configuring cfengine3.5, have created policy install package source, download tar balls url , untar , further digs make , make install, working fine except while download tar balls keeps @ "/etc" location, want cfengine put file @ /tmp.
is there way customize default behavior of cfengine keep temporary downloaded files @ "/tmp" instead of "/etc".
here policy snippet:
bundle agent install { vars: "packages" slist => { "algorithm-diff-1.1902", "apache-db-0.13", "apache-dbi-1.06", "apache-session-1.83", "apache-sessionx-2.01", "appconfig-1.65", "archive-tar-1.32", }; commands: "/usr/bin/wget http://10.x.x.x/downloads/perl-modules/$(packages).tar.gz; /usr/bin/gunzip $(packages).tar.gz; tar -xf $(packages).tar; cd $(packages); /usr/bin/perl makefile.pl; /usr/bin/make; /usr/bin/make install;" contain => standard, classes => satisfied(canonify("$(packages)-installed")); } body contain standard { useshell => "true"; exec_owner => "root"; }
thanks in advance.
you can add directory in commands should executed contain
body, this:
body contain standard { useshell => "true"; exec_owner => "root"; chdir => "/tmp"; }
please note there few contain
bodies in standard library (lib/3.5/commands.cf), maybe 1 of can used don't have write own. note cfengine executes root, exec_owner => "root"
not strictly necessary.
Comments
Post a Comment