openbsd-ports/mail/mailscanner/patches/patch-bin_MailScanner

64 lines
3.0 KiB
Plaintext

$OpenBSD: patch-bin_MailScanner,v 1.9 2009/10/07 20:59:29 sthen Exp $
--- bin/MailScanner.orig Thu Aug 13 06:18:29 2009
+++ bin/MailScanner Thu Aug 13 11:39:04 2009
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -I/opt/MailScanner/lib
+#!/usr/bin/perl -I%PREFIX%/lib/MailScanner
#
# MailScanner - SMTP E-Mail Virus Scanner
# Copyright (C) 2002 Julian Field
@@ -72,7 +72,7 @@ BEGIN {
# of each element
foreach $path (reverse @oldinc) {
next unless $path =~ /\//;
- $path =~ s/^\/usr/\/usr\/lib\/MailScanner\/utils/;
+ $path =~ s/^\/usr/\/usr\/local\/lib\/MailScanner\/utils/;
unshift @INC, $path;
}
@@ -209,8 +209,6 @@ if ($Versions) {
my($module, $s, $v, $m);
printf("Running on\n%s", `uname -a`);
- printf("This is %s", `cat /etc/redhat-release`) if -f "/etc/redhat-release";
- printf("This is %s", `head -1 /etc/SuSE-release`) if -f "/etc/SuSE-release";
printf("This is Perl version %f (%vd)\n", $], $^V);
print "\nThis is MailScanner version " . $MailScanner::Config::MailScannerVersion . "\n";
print "Module versions are:\n";
@@ -280,7 +278,7 @@ if ($WantLintOnly || $WantLintLiteOnly) {
# Find the mailscanner.conf file, with a default just in case.
my $ConfFile = $ARGV[0];
# Use the default if we couldn't find theirs. Will save a lot of grief.
-$ConfFile = '/opt/MailScanner/etc/MailScanner.conf' if $ConfFile eq "" ||
+$ConfFile = '%SYSCONFDIR%/MailScanner/MailScanner.conf' if $ConfFile eq "" ||
!(-f $ConfFile);
# Do they just want a dump of the processing-database table?
@@ -335,7 +333,7 @@ if (MailScanner::Config::QuickPeek($ConfFile, 'virussc
Currently you are using no virus scanners.
This is probably not what you want.
-In your /opt/MailScanner/etc/MailScanner.conf file, set
+In your %SYSCONFDIR%/MailScanner/MailScanner.conf file, set
Virus Scanners = clamav
Then download
http://www.sng.ecs.soton.ac.uk/mailscanner/files/4/install-Clam-SA.tar.gz
@@ -422,7 +420,7 @@ if ($WantLintOnly || $WantLintLiteOnly) {
}
my $cluid = MailScanner::Config::QuickPeek($ConfFile, 'runasuser');
my $clgid = MailScanner::Config::QuickPeek($ConfFile, 'runasgroup');
- my $clr = system("/opt/MailScanner/bin/mailscanner_create_locks \"$lockdir\" \"$cluid\" \"$clgid\"");
+ my $clr = system("%PREFIX%/bin/mailscanner_create_locks \"$lockdir\" \"$cluid\" \"$clgid\"");
print STDERR "Error: Attempt to create locks in $lockdir failed!\n"
if ($clr>>8) != 0;
@@ -719,7 +717,7 @@ if ($locksdir eq "" || $locksdir =~ /tmp$/i) {
print STDERR "Please move your \"Lockfile Dir\" setting in MailScanner.conf.\n";
print STDERR "It should point outside /tmp, preferably /var/spool/MailScanner/incoming/Locks\n";
}
-my $cl = system("/opt/MailScanner/bin/mailscanner_create_locks \"$locksdir\" \"$uname\" \"$gname\"");
+my $cl = system("%PREFIX%/bin/mailscanner_create_locks \"$locksdir\" \"$uname\" \"$gname\"");
print STDERR "Error: Attempt to create locks in $locksdir failed!\n"
if ($cl>>8) != 0;