DOKK / manpages / debian 12 / fai-client / fai-deps.8.en
FAI-DEPS(8) FAI-DEPS(8)

  fai-deps - class dependencies for FAI

  fai-deps [-h] [--man] [-d]

  implements dependencies between fai classes.

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 ...

One non-standard perl module is required:
Graph::Directed; On debian install libgraph-perl

The following environment variables are used:

 $LOGDIR  : path to fai temporary files
 $FAI     : path to fai config space

 https://fai-project.org

 Copyright 2008 by Ingo Wichmann <iw@linuxhotel.de>
 This software ist free software; you can redistribute it and/or modify
 it unter the same terms as Perl itself.
2023-06-24