Bug#390504: possible solution

Peter Bittner peter.bittner at thalesgroup.com
Thu Dec 3 22:20:21 CET 2009


... a related issue: When I execute fai-setup on a freshly installed
machine (hosting the latest FAI 3.3) the $FAI_CONFIGDIR never makes it
into /etc/exports.

Am I wrong or could this be a bug? $FAI_CONFIG_SRC is evaluated in
fai-setup:182 as follows

    if expr match "$FAI_CONFIG_SRC" 'nfs:\/\/' > /dev/null; then
        add_export_line $FAI_CONFIGDIR
"$addr(async,ro,no_subtree_check)"
    fi

However, $FAI_CONFIG_SRC is always empty. The if-clause always evaluates
to false.

In make-fai-nfsroot:228 there is the following code to provide a default
value in the the NFSROOT's /etc/fai/fai.conf:

    [ -z "$FAI_CONFIG_SRC" ] && echo "FAI_CONFIG_SRC=nfs://`hostname`
$FAI_CONFIGDIR" >> $NFSROOT/etc/fai/fai.conf

Shouldn't a similar code be in place in fai-setup to ensure an
appropriate line is appended to /etc/exports on the faiserver?
$FAI_CONFIG_SRC should default to the same value in both fai-setup and
make-fai-nfsroot according to the following comment in /etc/fai.conf:

# If undefined here, make-fai-nfsroot/fai-setup will use default value
# nfs://<install server>/$FAI_CONFIGDIR

If this is correct the following code should be added after line 49 in fai-setup:

[ -z "$FAI_CONFIG_SRC" ] && FAI_CONFIG_SRC=nfs://`hostname`$FAI_CONFIGDIR

This works fine for me.

What do you think about this problem and my suggested solution?
Peter


More information about the linux-fai mailing list