[PC-BSD Testing] Config editing
A.Yerenkow
yerenkow at uct.ua
Wed Dec 17 09:45:45 PST 2008
Well guys, I gathered 200+ configs from my working PC-BSD and analysed
them :)
I now can categorise all configs into 8 different logic types:
- (Tab/Space)-based tables (newsyslog.conf, fstab)
- Simple keyValue without section (rc.conf, resolv.conf)
- Simple keyValue with section 1 level deep (smb.conf, php.ini)
- Xorg conf (xorg.conf)
- Apache-type (httpd.conf)
- Section with braces type, multi depth (named.conf, nginx.conf, wep.conf)
- login.conf type (login.conf) (Not really different, but my parser have
own opinion about newline and comments ;) )
- zfs.conf (have not sufficient info, look later, very similar to simple
case)
and of course XML ones - I didn't count them, because they are in valid
easy parseable format already.
Currently I have working parser and some GUI, which can handle smb.conf
and other simple types, which preserves all correct comments and can
parse and understand that some values are valid sections and keyValue
pairs, only commented;
I'm working now on difficult parser cases, such as:
some key: value1, value2, /** comments **/, value 3
or
some key: value #comment
After part1 (parsing/editing/saving) completed, I'm going to part 2
(validating, advance validating) - such as check if specified path/file
exists, if entered value sane, etc. And after that, I'll try which is
hard ever - parse broken/mistyped configs.
So, I think soon we'll have one GUI for many cases while normal,
full-featured GUI not available.
BTW, I'll need some help for testing, any volunteers? :)
More information about the Testing
mailing list