Hi Jan,
You need to use -f to specify the input file, like this:
./cf-agent.exe -v -f /var/cfengine-3.2.3/inputs/cftest.cf
--Diego
On Mar 23, 2012, at 5:02 PM, Jan Muhammad wrote:
> Hi Group,
>
> I am testing CFengine 3.2.3 on a Windows 7 (using Cygwin); all seem to be
> fine, even there's no complain from cf-promise but when I run cf-agent I get
> following error messages:
>
> Unexpected argument with no preceding option:
> /var/cfengine-3.2.3/inputs/cftest.cf
> Fatal cfengine error: Aborted
>
> Note: I think it had worked initially once, I could see a file (cftest)
> created at /tmp; but when I removed the file and re-run cf-agent it gives me
> the Fatal Error message.
>
> Thanks in advance for help!
> -Jan
>
> $ ./cf-promises.exe -v /var/cfengine-3.2.3/inputs/cftest.cf
>
> > Unexpected argument with no preceding option:
> > /var/cfengine-3.2.3/inputs/cftest.cf
> cf3> Cfengine - autonomous configuration engine - commence self-diagnostic
> prelude
> cf3> ------------------------------------------------------------------------
> cf3> Work directory is /var/cfengine
> cf3> Making sure that locks are private...
> cf3> Checking integrity of the state database
> cf3> Checking integrity of the module directory
> cf3> Checking integrity of the PKI directory
> cf3> Looking for a source of entropy in /var/cfengine/randseed
> cf3> -> Loaded private key /var/cfengine/ppkeys/localhost.priv
> cf3> -> Loaded public key /var/cfengine/ppkeys/localhost.pub
> cf3> No registered cfengine service, using default
> cf3> !!! System error for getservbyname: "Operation not permitted"
> cf3> Setting cfengine default port to 5308 = 5308
> cf3> Reference time set to Fri Mar 23 22:34:40 2012
> cf3> CFEngine Core 3.2.3
> --skipped
> cf3> -> Policy is already validated
> cf3> > Parsing file /var/cfengine/inputs/promises.cf
> cf3> Initiate variable convergence...
> cf3> > Parsing file /var/cfengine/inputs/cfengine_stdlib.cf
> cf3> Initiate variable convergence...
> cf3> Initiate variable convergence...
> cf3> # Knowledge map reporting feature is only available in version Nova and
> above
> cf3> -> Defined classes = { *_*_*_* 192_168_56_1 32_bit Day23 Evening Friday
> GMT_Hr22 Hr22 Hr22_Q4 Jan_PC Lcycle_2 March Min45_50 Min49
> PK_MD5_e14115040a2b02a61dc10332c1f9d548 Q4 WinVista Yr2012 any cfengine
> cfengine_3 cfengine_3_2 cfengine_3_2_3 common community_edition
> compiled_on_cygwin cygwin_nt_6_1_wow64_1_7_11_0_260_5_3_
> --skiped
> cf3> -> Negated Classes = { }
> cf3> Initiate variable convergence...
> cf3> -> Additional class defined: am_policy_hub
> cf3> -> Inputs are valid
> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> $ ./cf-agent.exe -v /var/cfengine-3.2.3/inputs/cftest.cf
> > Unexpected argument with no preceding option:
> > /var/cfengine-3.2.3/inputs/cftest.cf
> > Fatal cfengine error: Aborted
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> The test promise is below:
> ===================================
> body common control
> {
> # Define a bundle sequence
> bundlesequence => { "checkperms" };
> # Include cfengine_stdlib.cf
> inputs => { "cfengine_stdlib.cf" };
> version => "1.0.0";
> }
> bundle agent checkperms
> {
> files:
> "/tmp/cftest"
> create => "true",
> perms => m("744");
> }
> ==============================================
>
> _______________________________________________
> Help-cfengine mailing list
> [email protected]
> https://cfengine.org/mailman/listinfo/help-cfengine
_______________________________________________
Help-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/help-cfengine