[augeas-devel] Lenses Interfaces not generating correct syntax

Nicolas Turpault n.turpault at alphalink.fr
Fri Apr 24 07:28:13 UTC 2009


Hello,

I try to use Augeas to generate configuration files but I have 2 
problems with the interfaces lenses.

- If I use the following code:
augtool> set /files/etc/network/interfaces/iface[1] lo
augtool> set /files/etc/network/interfaces/iface[1]/family inet
augtool> set /files/etc/network/interfaces/iface[1]/method loopback
augtool> save
/usr/share/augeas/lenses/interfaces.aug:76.16-80.67:Short split for concat
Saving failed

I have the folling error and the interfaces files is not generate :

/usr/share/augeas/lenses/interfaces.aug:76.16-80.67:Short split for concat
Saving failed


I have to add a command to generate the files, it's not a very important 
error but when we see the lences it seems that the comment is optionnal.


- My second problem is also with comment,
With the following code:
augtool> set /files/etc/network/interfaces/iface[1] lo
augtool> set /files/etc/network/interfaces/iface[1]/family inet
augtool> set /files/etc/network/interfaces/iface[1]/method loopback
augtool> set /files/etc/network/interfaces/iface[1]/#comment lo
augtool> save
Saved 1 file(s)

It generate the following file:
iface lo inet loopback# lo

And the syntax is not correct we need a space between loopback and #. I 
have tried to modify the lences and add a sto_to_spc or something like 
that but I not able to find a prety solution. How can we improve that?

Best regards,

Nicolas.




More information about the augeas-devel mailing list