Forum: Cfengine Help Subject: Re: Setting perms on home directory files Author: RIngersoll Link to topic: https://cfengine.com/forum/read.php?3,17127,17138#msg-17138
Here's what I have so far: body common control { bundlesequence => { "test" }; } bundle agent test { vars: "HomePattern" string => "admin|civei|cmo|dba|dit|perfmgmt|cmisradm|root"; "HomeDirn" int => readstringarray( "HomeDir", "/tmp/passwd.txt", "#[^\n]*", ":", "200", "14000" ); "HomeUsr" slist => getindices("HomeDir"); commands: "/bin/grep -E \":/home/($HomePattern).*:\" /etc/passwd >/tmp/passwd.txt" contain => shell; } body contain shell { useshell => "true"; } It appears to work fine when /tmp/passwd.txt does not already exist. But when /tmp/passwd.txt already exists cf-agent appears to hang: wilma:/home/root/inputs# cf-agent -KIvf ./homechown.cf |tee /tmp/cfagent.out cf3 Reference time set to Mon May 10 14:47:14 2010 cf3 Cfengine - 3.0.4 (C) Cfengine AS 2008- cf3 ------------------------------------------------------------------------ cf3 Host name is: wilma cf3 Operating System Type is hp-ux cf3 Operating System Release is B.11.23 cf3 Architecture = ia64 cf3 Using internal soft-class hpux for host wilma cf3 The time is now Mon May 10 14:47:14 2010 cf3 ------------------------------------------------------------------------ cf3 # Extended system discovery is only available in version Nova and above cf3 Additional hard class defined as: 32_bit cf3 Additional hard class defined as: hp_ux_B_11_23 cf3 Additional hard class defined as: hp_ux_ia64 cf3 Additional hard class defined as: hp_ux_ia64_B_11_23 cf3 GNU autoconf class from compile time: compiled_on_hpux11_23 cf3 Address given by nameserver: 172.27.227.221 cf3 Interface 1: lan1 cf3 Adding alias wilma.. cf3 Interface 2: lo0 cf3 Trying to locate my IPv6 address cf3 Looking for environment from cf-monitor... cf3 Loading environment... cf3 Environment data loaded cf3 *********************************************************** cf3 Loading persistent classes cf3 *********************************************************** cf3 *********************************************************** cf3 Loaded persistent memory cf3 *********************************************************** cf3 > Verifying the syntax of the inputs... At this point cf-promises is using 100% of a cpu. If I kill cf-agent, rm tmp/passwd.txt and rerun the bundle it works as expected. Any thoughts? Thanks! _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine