[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[augeas-devel] Lens similar to rsync.conf



Hi,

 

I need to make an adapter for a config file that’s almost identical to rsync but sections are expressed differently:

 

Toplevelrecord = val

Section/record = val2

Subsection/section/record=val3

 

Scanning the man page, rsync doesn’t seem to do subsections, but otherwise the equivalent rsync could be:

 

<pre>

rsync.conf

 

Toplevelrecord = val

[Section]

record = val2

</pre>

 

 

I tried to start by matching the regex like so:

[A-Za-z0-9 _.-\/]

 

But I get:

lenses/localconf.aug:33.0-38.24:Failed to compile entry

lenses/localconf.aug:34.17-.23:exception: The key regexp /[A-Za-z0-9_.-][A-Za-z0-9 _.-\/]*[A-Za-z0-9_.-]/ matches a '/'

 

lenses/tests/test_localconf.aug:26.6-.19:Could not load module LocalConf for LocalConf.lns

lenses/tests/test_localconf.aug:26.6-.19:Undefined variable LocalConf.lns

lenses/tests/test_localconf.aug: error: Loading failed

 

 

For clarifications:

@@ -25,43 +24,35 @@

 

 (************************************************************************

  *                        ENTRY

 * rsyncd.conf allows indented entries, but by default entries outside

  * sections are unindented

  *************************************************************************)

-let entry_re   = /[A-Za-z0-9_.-][A-Za-z0-9 _.-]*[A-Za-z0-9_.-]/

+let entry_re   = /[A-Za-z0-9_.-][A-Za-z0-9 _.-\/]*[A-Za-z0-9_.-]/

 

Any suggestions?

 

Thanks!

Dave

**********************************************************************

This communication is confidential and intended solely for the 
addressee(s). Any unauthorized review, use, disclosure or distribution
is prohibited. If you believe this message has been sent to you in 
error, please notify the sender by replying to this transmission and 
delete the message without disclosing it. Thank you.

E-mail including attachments is susceptible to data corruption, 
interception, unauthorized amendment, tampering and viruses, and we 
only send and receive e-mails on the basis that we are not liable for 
any such corruption, interception, amendment, tampering or viruses or 
any consequences thereof.

This email, its content and any attachments is PRIVATE AND 
CONFIDENTIAL to TANDBERG Television, Part of the Ericsson Group. 

www.tandbergtv.com
**********************************************************************

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]