package: fai-quickstart

When trying to upgrade from fai 3.2.17 to 3.3.1,
and keeping the existing configs in /etc/fai

The installscript fails completely to install the package (even though, if I already have fai-quickstart installed, users probably don't care for fai-quickstart to copy the example configspace...) fai-quickstart because of the changed config:


WARNING: The variable $FAI_CONFIGDIR is still defined in /etc/fai/fai.conf.
Please move it to /etc/fai/make-fai-nfsroot.conf.
mkdir: missing operand
Try `mkdir --help' for more information.
dpkg: error processing fai-quickstart (--configure):
 subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
 fai-quickstart
E: Sub-process /usr/bin/dpkg returned an error code (1)

rather, it's make-fai-nfsroot's job to notify the user that this missing important variable is not set in it's config file (which, by the way, it doesn't).

Anyway the fai-quickstart installscript should not try to use the variable after it already realized it's missing and printing a WARNING for the user.

Especially in a fai softupdate scenario this could lead to a stack of multiple package installs to fail, even though later, in the config task, the correct config is copied!



Patch attached
Index: debian/fai-quickstart.postinst
===================================================================
--- debian/fai-quickstart.postinst      (revision 5727)
+++ debian/fai-quickstart.postinst      (working copy)
@@ -21,6 +21,8 @@
        if egrep -q ^FAI_CONFIGDIR= /etc/fai/fai.conf; then
            echo "WARNING: The variable \$FAI_CONFIGDIR is still defined in 
/etc/fai/fai.conf."
            echo "Please move it to /etc/fai/make-fai-nfsroot.conf."
+        echo "NOT doing any further configuration - please copy your 
configspace yourself"
+        exit 0
        fi
 
        . /etc/fai/make-fai-nfsroot.conf

Reply via email to