Package: fai-client Version: 3.2.8 Severity: wishlist just wrote a script that implements dependencies between fai classes and ask for including it in fai.
how does it work? put this script in $FAI/class and make it executable. Now, 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]. Calling this file from withing defclass is not perfect: dependencies for $HOSTNAME and LAST are not possible. A solution could be, to call this script right after fai-class is called in task defclass. Somebody willing to include this? To do so 3 changes are necessary: 1. add a line fai-deps right after fai-class -T $FAI/class $LOGDIR/FAI_CLASSES in /usr/lib/fai/subroutines ( task_defclass() ) 2. add this script as /usr/bin/fai-class 3. new dependency to libgraph-perl for fai-class It should not break existing configurations, because it only acts if matching non-executable files $FAI/class/*.deps exist. Ingo [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 ... -- System Information: Debian Release: 4.0 APT prefers stable APT policy: (500, 'stable') Architecture: amd64 (x86_64) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.18-6-amd64 Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8) Versions of packages fai-client depends on: ii file 4.17-5etch3 Determines file type using "magic" ii libapt-pkg-perl 0.1.20 Perl interface to libapt-pkg ii libparse-recdescent-perl 1.94.free-3 Generates recursive-descent parser ii perl 5.8.8-7etch3 Larry Wall's Practical Extraction Versions of packages fai-client recommends: ii debconf-utils 1.5.11etch2 debconf utilities ii liblinux-lvm-perl 0.13-1 Perl extension for accessing Logic -- no debconf information -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]