Fixed svn 495

Matt Richards wrote:
> Greetings. A little issue with using readstringlist. It seems the list
> gets populated with garbage characters when the resulting list should
> contain nothing. I tried to track it down, but I think Mark would find
> this one within minutes.
> 
> Consider the following example:
> 
> ##########################################################################
> 
> body common control {
> 
>     bundlesequence => { "readstring_test" };
> 
> }
> 
> ##########################################################################
> 
> 
> bundle agent readstring_test {
> 
>   vars:
> 
>     "entry" slist => { readstringlist("/tmp/testfile","#.*","[\n]",200,4000) 
> };
> 
>   reports:
>     Yr2009::
>        "entry:$(entry)";
> }
> 
> ##########################################################################
> 
> 
> If /tmp/testfile contain only comments:
> 
> ############################################
> # comments
> #
> # more comments
> #
> # boy, do I love comments
> #
> ############################################
> 
> The resulting report looks like:
> 
> cf3    =========================================================
> cf3    reports in bundle readstring_test (1)
> cf3    =========================================================
> cf3
> cf3 Verifying SQL table promises is only available with Cfengine Nova or above
> cf3
> cf3     .........................................................
> cf3     Promise handle:
> cf3     Promise made by: entry:  ¸ <<<< ouch (part 1)
> cf3     .........................................................
> cf3
> cf3 R: entry:  ¸ <<<<<< ouch (part 2)
> _______________________________________________
> Bug-cfengine mailing list
> Bug-cfengine@cfengine.org
> https://cfengine.org/mailman/listinfo/bug-cfengine

-- 
Mark Burgess

-------------------------------------------------
Professor of Network and System Administration
Oslo University College, Norway

Personal Web: http://www.iu.hio.no/~mark
Office Telf : +47 22453272
-------------------------------------------------
_______________________________________________
Bug-cfengine mailing list
Bug-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/bug-cfengine

Reply via email to