pkgsrc/mail/majordomo/patches/patch-ag
spz 65b08c5ecc missed three more command line config file options
added descriptions to the patches
2011-01-29 19:39:14 +00:00

34 lines
832 B
Text

$NetBSD: patch-ag,v 1.3 2011/01/29 19:39:14 spz Exp $
avoid the wrapper + -C trap
--- medit.orig 1997-04-28 18:38:05.000000000 +0000
+++ medit
@@ -16,19 +16,25 @@
# set our path explicitly
$ENV{'PATH'} = "/bin:/usr/bin:/usr/ucb";
-# Read and execute the .cf file
-$cf = $ENV{"MAJORDOMO_CF"} || "/etc/majordomo.cf";
+# Read and execute the .cf file. Let the environment variable win
+$cf = "/etc/majordomo.cf";
if ($ARGV[0] eq "-C") {
$cf = $ARGV[1];
shift(@ARGV);
shift(@ARGV);
}
+
+if ($ENV{"MAJORDOMO_CF"}) {
+ $cf = $ENV{"MAJORDOMO_CF"};
+}
+
if (! -r $cf) {
die("$cf not readable; stopped");
}
require "$cf";
# All these should be in the standard PERL library
+unshift(@INC, $bindir);
unshift(@INC, $homedir);
require "shlock.pl"; # NNTP-style file locking
require "majordomo.pl";