Re: cf3 (3.0.2) readstring array with no values (after comments)
Mark Burgess <[email protected]> Mon, 14 Sep 2009 20:55:24 +0200
| Newsgroups | gmane.comp.sysutils.cfengine.bugs |
|---|---|
| Message-ID | <[email protected]> |
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 =3D> { "readstring_test" };
> =
> }
> =
> ##########################################################################
> =
> =
> bundle agent readstring_test {
> =
> vars:
> =
> "entry" slist =3D> { 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 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> cf3 reports in bundle readstring_test (1)
> cf3 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> cf3
> cf3 Verifying SQL table promises is only available with Cfengine Nova or =
above
> cf3
> cf3 .........................................................
> cf3 Promise handle:
> cf3 Promise made by: entry: =B8 <<<< ouch (part 1)
> cf3 .........................................................
> cf3
> cf3 R: entry: =B8 <<<<<< ouch (part 2)
> _______________________________________________
> Bug-cfengine mailing list
> [email protected]
> 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
-------------------------------------------------