Bacula-users

[Bacula-users] How to parse Bacula conf files

2010-10-19 08:32:19
Subject: [Bacula-users] How to parse Bacula conf files
From: Yuri Timofeev <tim4dev AT gmail DOT com>
To: bacula-users <bacula-users AT lists.sourceforge DOT net>
Date: Tue, 19 Oct 2010 15:28:29 +0300
Hi

During development the prototype of the my new system (Webacula 5.5),
I tried to parse the bacula-dir.conf.
However, this is probably not possible with simple regexp's.
It turned out that some applications, for example, Webmin does this
with a regexp.

But they're doing it wrong!

For example, here is test configuration (which is written according to
"Bacula Main Reference: Customizing the Configuration Files")
contains no errors in terms of Bacula (I checked it) but it would be
wrong parsed (I have not tested it, but I'm sure of it) by 3rd parties
parsers (not native) :

-----------------------------------------
# comment1
  # comment2

    c  o n s o l e
{ Name=name1; Password = "p; \\\a s s w o rd"; J o b A C L = *all\*
}Con sole { N a m e = "name 2"; Pass word = "password"; JobACL =
job/\1, job2, job3
}

-----------------------------------------


I.e. in other words to parse with regexp any Bacula configuration will
be very difficult.

-- 
with best regards

------------------------------------------------------------------------------
Download new Adobe(R) Flash(R) Builder(TM) 4
The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly 
Flex(R) Builder(TM)) enable the development of rich applications that run
across multiple browsers and platforms. Download your free trials today!
http://p.sf.net/sfu/adobe-dev2dev
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users

<Prev in Thread] Current Thread [Next in Thread>