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
This commit is contained in:
Ask Bjørn Hansen 2003-08-30 15:14:56 +00:00
parent 53efac2e14
commit e006f74d23

View File

@ -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 ($@) {