Package: fai-server
Version: 3.4.4
Severity: minor

--- Please enter the report below this line. ---
fai-setup doesn't add a line to /etc/exports to export the config space. However, it adds a line for the nfsroot.

I found this in /etc/fai/fai.conf:

  #FAI_CONFIG_SRC=nfs://yourservername/path/to/config/space

I removed the # and called fai-setup again, this is the result in /etc/exports:

/srv/fai/config 192.168.2.20/24(async,ro,no_subtree_check)

Seems wrong to me, if the user gives a config-space that starts with nfs:// there is no need to export another config-space. If the variable isn't there or is empty, the user should get a message that that he has to export the config-space himself.

On top of that I suggest that when the variable FAI_CONFIG_SRC contains nfs_default, a line is added to /etc/exports to export the default config space.

A patch against fai-setup is attached.

--- System information. ---
Architecture: amd64
Kernel: Linux 2.6.36-tecneeq-03

Debian Release: squeeze/sid
500 testing localhost

--- Package information. ---
Package's Depends field is empty.

Package's Recommends field is empty.

Package's Suggests field is empty.




--
Nur die Lüge braucht die Stütze der Staatsgewalt;
die Wahrheit steht von alleine aufrecht.

--- /usr/sbin/fai-setup 2010-10-15 11:15:40.000000000 +0200
+++ fai-setup   2010-11-15 17:15:25.000000000 +0100
@@ -177,8 +177,13 @@
     : ${SERVERINTERFACE:=eth0}  # set to eth0 if not already set
     addr=$(ip addr show dev $SERVERINTERFACE | grep -w inet | cut -d t -f 2 | 
cut -d ' ' -f 2 | head -1)
 
-    if expr match "$FAI_CONFIG_SRC" 'nfs:\/\/' > /dev/null; then
+    if [ _"$FAI_CONFIG_SRC" = _nfs_default ] ; then
         add_export_line $FAI_CONFIGDIR  "$addr(async,ro,no_subtree_check)"
+    elif expr match "$FAI_CONFIG_SRC" 'nfs:\/\/' > /dev/null; then
+        echo "No /etc/exports line for config space needed"
+    else
+        echo "The variable \$FAI_CONFIG_SRC is not properly set. Edit"
+        echo "/etc/fai/fai.conf or export the FAI config space yourself."
     fi
     add_export_line $NFSROOT  "$addr(async,ro,no_subtree_check,no_root_squash)"
     if [ -z "$nfsserver" ]; then

Reply via email to