[augeas-devel] possible shellvars bug?

James Eckersall James.Eckersall at fasthosts.com
Tue Dec 17 10:45:52 UTC 2013


Hi,

I believe I may have found a bug in the shellvars lens for Augeas.  Either that, or I'm not using it correctly.
This relates to /etc/sysconfig/varnish, but I've been able to replicate it with a simple test file.
Augeas uses the shellvars lens on /etc/sysconfig/varnish, so I presume this is the correct lens to be using.

This is on a CentOS 6 box, running augeas-1.0.0-5.el6.x86_64

Given the following file:

$ cat /tmp/testaug.file
BLAH=" \
test \
test2"
$

Running augtool as follows, I get the following error:

$ echo "rm /augeas/load/*
> set /augeas/load/Shellvars/lens Shellvars.lns
> set /augeas/load/Shellvars/incl /tmp/testaug.file
> load
> print /augeas//error
> " | augtool --noload
rm : /augeas/load/* 1368
/augeas/files/tmp/testaug.file/error = "parse_failed"
/augeas/files/tmp/testaug.file/error/pos = "4"
/augeas/files/tmp/testaug.file/error/line = "1"
/augeas/files/tmp/testaug.file/error/char = "4"
/augeas/files/tmp/testaug.file/error/lens = "/usr/share/augeas/lenses/dist/shellvars.aug:163.12-.99:"
/augeas/files/tmp/testaug.file/error/message = "Syntax error"

I initially thought it was the backslash-newline, but after further testing, it seems to be the combination of double-quotes and the backslash-newline.
If I change the double quotes to single quotes, it works fine.  If I have the following on a single line, that works fine:
BLAH="test test2"


Any help will be appreciated.

Regards

James
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/augeas-devel/attachments/20131217/2a1217d4/attachment.htm>


More information about the augeas-devel mailing list