From e2e024972d130f919890bb84aeab02354e0ff5c1 Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Sun, 28 Mar 2010 17:04:59 -0400 Subject: More fixes to the start up procedure. The root cause of the fix is that when var_dir in the config file is a relative path, the bin/master and bin/qrunner subprocesses end up creating another hierarchy under $VAR_DIR. This is because 'bin/mailman start' chdirs to $VAR_DIR before starting master. The fix involves putting the absolute path to $VAR_DIR in the $MAILMAN_VAR_DIR environment variable. If the configuration file reader sees this, it uses the value instead of $var_dir from the configuration file. Another change is to remove qrunner's --subproc/-s option and stick this in the environment as well, using $MAILMAN_UNDER_MASTER_CONTROL. Other fixes here include: * Deciphering the master lock file contents correctly * Reformatting the error message so that it fits in 79 columns when prefixed by argparse error info. --- src/mailman/commands/cli_control.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/mailman/commands/cli_control.py') diff --git a/src/mailman/commands/cli_control.py b/src/mailman/commands/cli_control.py index e6c9c83b3..83432a6e8 100644 --- a/src/mailman/commands/cli_control.py +++ b/src/mailman/commands/cli_control.py @@ -108,6 +108,9 @@ class Start: # call. os.setsid() # Instead of cd'ing to root, cd to the Mailman runtime directory. + # However, before we do that, set an environment variable used by the + # subprocesses to calculate their path to the $VAR_DIR. + os.environ['MAILMAN_VAR_DIR'] = config.VAR_DIR os.chdir(config.VAR_DIR) # Exec the master watcher. execl_args = [ -- cgit v1.2.3-70-g09d2