* Michael Tautschnig <m...@debian.org> [Sat Sep 18, 2010 at 09:07:13AM +0200]:
> > * Michael Tautschnig <m...@debian.org> [Sat Apr 03, 2010 at 11:34:20AM 
> > +0200]:
> > > > >>>>> On Tue, 30 Mar 2010 21:52:27 +0100, Holger Levsen 
> > > > >>>>> <hol...@layer-acht.org> said:

[subclasses]

> > > > Have a look at #498412, there's a sample implementation from Ingo, so
> > > > it's already documented. You may want to add this information to the
> > > > FAI wiki.

> > > I'm using some kind of subclasses for a long time now and it was really 
> > > easy to
> > > implement using a single script in class/ that evaluates an extra file
> > > class/$class if class/$class exists.

> > > I'm not sure how feature-complete the FAI Guide intends to be, but maybe 
> > > it
> > > could be as simple as to add references to this bug report and #468352 to
> > > Section 11 (Various Hints)?

> > ACK. Adding this to the official documentation (maybe in a
> > summarized version so users don't have to digg through the whole
> > bugreport) would be worth the effort IMO.

> > Could anyone with knowledge regarding this issue please volunteer to
> > come up with a few lines of documentation?

> I was initially considering to simply post my scripts and setup here, which 
> I'll
> do nevertheless. But if we really want a proper solution, Ingo's solution 
> looks
> really nice and pretty feature-complete. I'll therefore include that into the
> experimental branch at least; I will, however, not add it to subroutines or 
> the
> like, but instead the user shall be calling fai-deps from within some script 
> in
> $FAI/class/ at will. It's finally included in 4.0~beta2+experimental8.

> The very simple solution I'm using is as follows, and is part of my
> $FAI/class/02more.sh:

> base_class=`grep "^$HOSTNAME " $FAI/class/CLASSES | awk '{ print $2 }'`
> for class in $classes $base_class ; do
>   [ "$class" = "$HOSTNAME" ] && continue
>   [ -f $FAI/class/$class ] && cat $FAI/class/$class
> done

> if [ "$base_class" = "$HOSTNAME" ] ; then
>   exit 0
> fi
> echo $base_class

> and a $FAI/class/CLASSES file that has entries like these:

> gnat DNS 
> bull bull
> cola SHELL_SERVER
> calf MAILRELAY
> wasp XEN0

> I guess such a snippet could easily be included in the documentation, but for
> complex dependencies there is no way around Ingo's solution.

Nice, thanks for sharing.

Thomas, what's your opinion about that?
Should we mention Michael's and Ingo's solution in the docs?

regards,
-mika-

Attachment: signature.asc
Description: Digital signature

Reply via email to