fai-deps uses files $FAI/class/*.deps to sort the classes in $LOGDIR/FAI_CLASSES and define additional
ones. While doing so, it retains the original order as much as possible.
*.deps files may contain class names, separated by whitespace. Comments ( after # or ; ) are ignored
e.g. you have a class WORDPRESS that depends on the classes VHOST and POSTGRES . VHOST again may depend
on WEBSERVER. So if you want to install the blogging software wordpress, you add a file
$FAI/class/WORDPRESS.deps
that contains the words
VHOST
POSTGRES
and a file
$FAI/class/VHOST.deps
that contains the word
WEBSERVER
The order often is important, so this script is taking care of it. The order of the example above would
be:
WEBSERVER VHOST POSTGRES WORDPRESS
That way, in $FAI/scripts/ first the webserver would be configured, then the vhosts, ...
It removes double entries from FAI_CLASSES and handles circular dependencies[1].
I do not recommend using circular dependencies, but if you accidentally define them, they will not break
your neck. But you'll get a warning ...