summaryrefslogtreecommitdiff
path: root/fml/lib
diff options
context:
space:
mode:
authorfukachan <fukachan>2002-12-22 14:22:24 +0000
committerfukachan <fukachan>2002-12-22 14:22:24 +0000
commit63b49c272b74b4ca5caacaae57e4900253f7cf68 (patch)
treed683a9bf40e7358f6d333f4d3df367c5a09189e7 /fml/lib
parent479a38cade5e9abb26c4df13e26221969383c73e (diff)
downloadfml8-63b49c272b74b4ca5caacaae57e4900253f7cf68.tar.gz
fml8-63b49c272b74b4ca5caacaae57e4900253f7cf68.tar.bz2
fml8-63b49c272b74b4ca5caacaae57e4900253f7cf68.zip
PR (fml-devel:343)
check the existence of virtual file.
Diffstat (limited to 'fml/lib')
-rw-r--r--fml/lib/FML/MTAControl/Postfix.pm15
1 files changed, 11 insertions, 4 deletions
diff --git a/fml/lib/FML/MTAControl/Postfix.pm b/fml/lib/FML/MTAControl/Postfix.pm
index 167b506a..f924d562 100644
--- a/fml/lib/FML/MTAControl/Postfix.pm
+++ b/fml/lib/FML/MTAControl/Postfix.pm
@@ -4,7 +4,7 @@
# All rights reserved. This program is free software; you can
# redistribute it and/or modify it under the same terms as Perl itself.
#
-# $FML: Postfix.pm,v 1.12 2002/11/07 08:38:23 fukachan Exp $
+# $FML: Postfix.pm,v 1.13 2002/12/18 04:03:52 fukachan Exp $
#
package FML::MTAControl::Postfix;
@@ -348,7 +348,12 @@ sub postfix_remove_virtual_map
my $virtual = $config->{ postfix_virtual_map_file };
my $virtual_new = $virtual . 'new'. $$;
- print STDERR "removing $key in $virtual\n";
+ if (-f $virtual) {
+ print STDERR "removing $key in $virtual\n";
+ }
+ else {
+ return;
+ }
use FileHandle;
my $rh = new FileHandle $virtual;
@@ -395,8 +400,10 @@ sub postfix_update_virtual_map
my $postmap = $config->{ path_postmap };
my $virtual = $config->{ postfix_virtual_map_file };
- print STDERR "updating $virtual database\n";
- system "$postmap $virtual";
+ if (-f $virtual) {
+ print STDERR "updating $virtual database\n";
+ system "$postmap $virtual";
+ }
}