summaryrefslogtreecommitdiff
path: root/fml/lib/FML/Command/Admin
diff options
context:
space:
mode:
authorfukachan <fukachan>2002-10-29 10:38:15 +0000
committerfukachan <fukachan>2002-10-29 10:38:15 +0000
commitfd4eed1dc39b6edc49e8667ce1cf089662c39554 (patch)
tree8c21ee8b330b299cbfa16eef1903b431b16f0756 /fml/lib/FML/Command/Admin
parent82001f3d939afb46bbdb5a067ccde92f5ea34b2d (diff)
downloadfml8-fd4eed1dc39b6edc49e8667ce1cf089662c39554.tar.gz
fml8-fd4eed1dc39b6edc49e8667ce1cf089662c39554.tar.bz2
fml8-fd4eed1dc39b6edc49e8667ce1cf089662c39554.zip
handle both public and private directories in initialization phase.
create variables: $newml_command_init_public_dirs $newml_command_init_private_dirs changed newml codes to use them.
Diffstat (limited to 'fml/lib/FML/Command/Admin')
-rw-r--r--fml/lib/FML/Command/Admin/newml.pm15
1 files changed, 13 insertions, 2 deletions
diff --git a/fml/lib/FML/Command/Admin/newml.pm b/fml/lib/FML/Command/Admin/newml.pm
index f1ec6d2d..4ddc1d43 100644
--- a/fml/lib/FML/Command/Admin/newml.pm
+++ b/fml/lib/FML/Command/Admin/newml.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: newml.pm,v 1.52 2002/09/22 14:56:45 fukachan Exp $
+# $FML: newml.pm,v 1.53 2002/10/29 09:07:39 fukachan Exp $
#
package FML::Command::Admin::newml;
@@ -145,13 +145,21 @@ sub _init_ml_home_dir
}
# $ml_home_dir/etc/mail
- my $dirlist = $config->get_as_array_ref('newml_command_init_dirs');
+ my $dirlist = $config->get_as_array_ref('newml_command_init_public_dirs');
for my $_dir (@$dirlist) {
unless (-d $_dir) {
print STDERR "creating ", $_dir, "\n";
$curproc->mkdir( $_dir, "mode=public");
}
}
+
+ $dirlist = $config->get_as_array_ref('newml_command_init_private_dirs');
+ for my $_dir (@$dirlist) {
+ unless (-d $_dir) {
+ print STDERR "creating ", $_dir, "\n";
+ $curproc->mkdir( $_dir, "mode=private");
+ }
+ }
}
@@ -212,6 +220,7 @@ sub _update_aliases
my $ml_name = $config->{ ml_name };
my $ml_domain = $config->{ ml_domain };
my $alias = $config->{ mail_aliases_file };
+ my $mask = umask( 022 );
# append
if ($self->_is_mta_alias_maps_has_ml_entry($curproc, $params, $ml_name)) {
@@ -239,6 +248,8 @@ sub _update_aliases
};
croak($@) if $@;
}
+
+ umask( $mask );
}