On Tue, Feb 17, 2015 at 07:32:22PM -0500, Wietse Venema wrote:

> > > # postmulti -l
> > > postmulti: fatal: instance /etc/postfix,
> > > shlib_directory=/usr/lib/postfix conflicts with instance /etc/postfix,
> > > daemon_directory=/usr/lib/postfix 
> 
> DO NOT set daemon_directory the same as shlib_directory.

IIRC the main reason for the conflict detection in question is to
avoid use of the shared directories also as per-instance directories.

Use of the same pathname for two shared directories should also be
avoided (thus solving your immediate problem).

If we wanted to tolerate such use, something like the patch below
(untested) might make it possible:

diff --git a/src/postmulti/postmulti.c b/src/postmulti/postmulti.c
index 0d124ae..1d2292a 100644
--- a/src/postmulti/postmulti.c
+++ b/src/postmulti/postmulti.c
@@ -971,7 +971,9 @@ static void check_shared_dir_status(void)
                      sp->param_name, sp->param_value[0]);
        if (strcmp(sp->param_name, VAR_META_DIR) == 0)
            continue;
-       register_claim(var_config_dir, sp->param_name, sp->param_value[0]);
+       /* Tolerate duplicate pathnames between the shared directories. */
+       if (IS_CLAIMED_BY(sp->param_value[0]) == 0)
+           register_claim(var_config_dir, sp->param_name, sp->param_value[0]);
     }
 }
 
This relies on the "claims" of the shared directories being registered
first, which is the case now, and is likely to remain so.

Since Linux systems seem to lack a /usr/libexec, you can use:

        daemon_directory = /usr/lib/postfix
        shlib_directory = /usr/lib/postfix/lib

This is something the distribution maintainers will have to figure
out.  If you are a distribution maintainer, please DO NOT apply
the above patch unless it is first adopted upstream.

-- 
        Viktor.

Reply via email to