Package: condor
Version: 7.8.1~dfsg.1-2
Severity: important
Tags: patch

>From a user report via email:

The package fails to install/upgrade whenever an admin removes/unsets any of
the following of Condor's config variables

LOCAL_UNIV_EXECUTE CRED_STORE_DIR EXECUTE LOCK LOG SPOOL

The reason is that the postinst script does not handle this condition
and fails whenever the corresponding condor_config_val call to query the
respective value fails.

A simple patch is attached -- courtesy of Tim Cartwright.
diff --git a/debian/condor.postinst b/debian/condor.postinst
index 04e4584..91ac8a5 100755
--- a/debian/condor.postinst
+++ b/debian/condor.postinst
@@ -18,8 +18,7 @@ condor_debconf_cfg=/etc/condor/config.d/00debconf
 
 condor_make_homedir() {
     for dlabel in LOCAL_UNIV_EXECUTE CRED_STORE_DIR EXECUTE LOCK LOG SPOOL; do
-        dname=$(condor_config_val $dlabel)
-        if [ $? -eq 0 ]; then
+        if dname=$(condor_config_val $dlabel 2>/dev/null); then
             mkdir -p $dname
             chown -R $condor_user: $dname
         else

Reply via email to