Ideas about metaconfiguration tool (proz?)

Lukas Dobrek dobrek at itp.uni-hannover.de
Mon May 21 15:02:26 CEST 2001


On Mon, May 21, 2001 at 12:00:38PM +0200, Michal Moskal wrote:
> Hello,
> 
> Background.
> 
> About a month ago there was an discussion about metaconfiguaration
> tool on pld-installer@ list. As this problem is only paritally
> connected to installer, I think this list is better place to
> discuss it.
> 
> What is it?
> 
> The idea is, to some extent, generalization of rc-inted and
> rc-root projects. The goal is to provide unified way of system
> configuaration. I.e. it doesn't matter what inetd, finger or
> bootloader program you use, you configure them all the same way.
> Rc-{boot,inetd} was designed for this purpouse too, but I guess
> the main reason was to provide way of spliting configuration into
> several files, so they can be easly updated using rpm packages. Of
> course metaconfigurator will support all this, but eventaully also
> much more.
I want to say on the very begining that in my opinion it is useless. 
But it does't mean that we cannot do that. I see it as a kind of intelectual 
chalange. In this circumstances I want to go for everything. No 
half solutions. 

So let me try to expres my idea. 

The shell sucks becouse it is to simple. Seting the variables 
as SOMETHING=dupa.salata is not suficient. For a very simple reason
It can happend that the script will have to check a lot of conditions 
concerning this varible.  Shell is not a good language for that.
We have three levels. Config file of the program ex: (/etc/inetd.conf;
/etc/passwd) We have the metaconfig file which is easy to write for a user.
Like /etc/sysconfig/rc-inetd/*. 
The purpose of your previous letter was to discus should we use shell or XML. 
I know we should't use shell. I don't know things about XML but let me give 
an example. Supose we are writing config file for rc-boot.

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>

This was simple lets go further.
<varible>
ROOT
<posible_valuess>
<file>/dev/hd*</file><file>/dev/sd*</file> and so on
<posible_valuess>
<error>
Error number 19897FFFGASY^^^$$$#$%%%@@@
<error>
</varible>
 
Then I am doing 
metaconfig --validate /etc/sysconfig/rc-boot/image/Linux-3.4.7-22
And I have the result ok or not ok.:)) 

Obviously parsing <file>dupa</file>  is something diferent then
<val>dupa</val>. One can check if this file exist if it is non empty,
If it has the write permition or whatever.

For instance 
<file perms=0600 owner=root group=root>
/etc/lilo.conf
</file>

Could be used as a rule for defining varible DEFAULT_LILO_CONFIG_FILE 
used in one of the rc-boot config files. 

I don't know if this is a good idea. I don't know how difficoult it is
to write. In case of rc-boot I tryed to add 
some validation of config file. But without big success, it is 
damn hard in shell.

But it looks it is posible to do. This whould be only one tool,
independet from the others. Something to validate the metaconfig files. 
The next thing is to create the real config files. But when we know it
has sense. 

Unfortunatly it is not as easy as it look like. There can be some more
sofisticated conditions for varibles. And this I don't know how to write 
using XML but probably there is a posibility.

This idea have also one posible advantege if somebody would like to
write a grafical tool for managing this metaconfiguration files. 
The XML files 
with definitions of varibles can by very easly parsed and converted into 
some FUI  or whatever. 

The rest is to convert this metafiles into real configfiles. This is
also not easy. But I really thing that for user it is easyer to write
VAR=bzzzzz then to write XML. The goal of metaconfigurator is to do
something smart with this. 

What do you thing about it?

Take Care
 The Lord of the Darknes 
     Lukasz      Dobrek 

-- 
Łukasz Dobrek
Institut für Theoretische Physik
Appelstraße 2, 30167 Hannover, Germany
e-mail:dobrek at itp.uni-hannover.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: not available
Url : /mailman/pipermail/pld-devel-en/attachments/20040626/68bef1a9/attachment-0002.bin


More information about the pld-devel-en mailing list