From e006f74d2356ec77f96d4e5389e8299b309e3b3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ask=20Bj=C3=B8rn=20Hansen?= Date: Sat, 30 Aug 2003 15:14:56 +0000 Subject: [PATCH] Use $ENV{QMAIL} to override /var/qmail for where to find the control/ directory. git-svn-id: https://svn.perl.org/qpsmtpd/trunk@169 958fd67b-6ff1-0310-b445-bb7760255be9 --- lib/Qpsmtpd.pm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/Qpsmtpd.pm b/lib/Qpsmtpd.pm index 59f31c0..df03f9e 100644 --- a/lib/Qpsmtpd.pm +++ b/lib/Qpsmtpd.pm @@ -53,15 +53,14 @@ sub get_qmail_config { if ($self->{_config_cache}->{$config}) { return wantarray ? @{$self->{_config_cache}->{$config}} : $self->{_config_cache}->{$config}->[0]; } - my $configdir = '/var/qmail/control'; + my $configdir = ($ENV{QMAIL} || '/var/qmail') . '/control'; my ($name) = ($0 =~ m!(.*?)/([^/]+)$!); $configdir = "$name/config" if (-e "$name/config/$config"); my $configfile = "$configdir/$config"; if ($type and $type eq "map") { - warn "MAP!"; - return +{} unless -e $configfile; + return +{} unless -e $configfile . ".cdb"; eval { require CDB_File }; if ($@) {