Ideas about metaconfiguration tool (proz?)

Michal Moskal malekith at pld.org.pl
Mon May 21 18:06:06 CEST 2001


On Mon, May 21, 2001 at 03:02:26PM +0200, Lukas Dobrek wrote:
> This is the metaconfig file with desciption of an booting procedure for Linux.
> 
> TYPE=LINUX
> ROOT=/dev/hda2
> KERNEL=/boot/kernel-3.4.7-22.gz
> INITRD=/boot/initrd
> VGA=0x317
> APPEND="video=atyfb:1024x768,font=SUN12x22"
> 
> The config file is /etc/lilo.conf or /boot/grub/menu.lst (just for
> information).
> 
> Ok it is cleari, easy to write and simple. But I would like to have also 
> something like this somewhere. 
> 
> <varible> 
> TYPE
> <posible_valuess>
> <val>LINUX</val><val>WINDA</val><val>bsd</val><val>dupa</val>
> <error>
> Sorry but there is no such OS.
> <error>
> <error LANG=pl>
> Nie ma takiego systemu baranie.
> <error LANG=pl>
> </posible_valuess>
> </verible>

As Wiget pointed out: it's much like XML-Schama... So there are (will
be?) tools ready for this kind of validation. However they validate
XML, not Name=value pairs. There are two parts of meteconfigurator work:
one is to validate meta.config -- this can be done using XML-Schama/DTD,
but only if config file is in XML, the second is to generate sth.conf.
Shell would be good here I guess.

I see why you like Name=value way more then XML. It seems clearer. But
it's only first sight... I guess much problems can arise when dealing
with more complicated config files, especially when we want to put lot
of information in the same file. OTOH:

<image>
 <type>LINUX</type>
 <root>/dev/hda2</root>
 <kernel>/boot/kernel-3.4.7-22.gz</kernel>
 <initrd>/boot/initrd</initrd>
 <vga>0x317</vga>
 <append>video=atyfb:1024x768,font=SUN12x22</append>
</image>

is not all that hard to write. After turning some syntax highlight on,
it even looks clear. And writing tools to modify XML is nowadays much
easier then writing tools to modify name=value pairs...

-- 
: Michal ``,/\/\,       '' Moskal    | |            : GCS {C,UL}++++$
:          |    |alekith      @    |)|(| . org . pl : {E--, W, w-,M}-
:                                  |                : {b,e>+}++ !tv h
: Current project:  http://aleph-0.dhs.org/ywindow/ : PLD Team member



More information about the pld-devel-en mailing list