summaryrefslogtreecommitdiff
path: root/mail/majordomo/patches/patch-ag
blob: b1791be083f3a1f70a57640c3be7e67d67fe2e2e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
$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";