fai/class separation

Thomas Lange lange at informatik.Uni-Koeln.DE
Thu Jan 16 15:09:56 CET 2003


>>>>> On Thu, 16 Jan 2003 14:44:57 +0800 (WST), Niall Young <niall at chime.net.au> said:

    > I'm new to classes :-) but as an extension to bundling all of a
    > class's components together - what would be the best way to
    > separate the builtin FAI classes from user defined classes?  Or
    > is it assumed that the whole FAI_CONFIGDIR/* will be customised
    > completely?!?

After you've installed fai using apt-get or dpkg and you have called
fai-setup you have no scripts in FAI_CONFIGDIR
(/usr/local/share/fai). Then fai suggests to copy examples of scripts
and config files from usr/share/fai/templates to FAI_CONFIGDIR. But
you can also create all theses files by your own. So you have the
freedom to write your own scripts in ../class/ which defines classes. 

But I recommend to use the template scripts which defines the
classes. One important feature of theses scripts is, that the class
mechanism is very simple. It's just a ordered list of class names,
which defines a priority inside the classes. Using more complex
scripts and using inheritance or dependencies makes the whole
configuration task complex. I think it will be very hard to have
controll over all the dependencies you are creating inside the classes
and scripts. What about testing (oooh testing takes a lot of time)
this huge moster of classes and scripts in /fai/scripts. Do you think
these scripts will work in all situations of defined classes when
classes create dependencies?

My preference is: Keep it simple!


    > I'd like to keep my own classes as separate as possible and not
    > touch the builtin classes and scripts if possible.  Something
    > like:
But you will always have the freedom to define the classes as you
like. It you dislike fai-class, just write a hook
task_defclass.DEFAULT and you can do whatever you want.

-- 
Gruss Thomas



More information about the linux-fai mailing list