summaryrefslogtreecommitdiff
path: root/fml/lib
diff options
context:
space:
mode:
authorfukachan <fukachan>2002-05-13 14:22:53 +0000
committerfukachan <fukachan>2002-05-13 14:22:53 +0000
commite0c6c7bff4390bbbe32f5727ac2f38dbbbde140b (patch)
tree980d7c3a81c35b8a268e4912e47a6d5c516c61bb /fml/lib
parent6538b757b455fc3617e3a9979612d594896c1d83 (diff)
downloadfml8-e0c6c7bff4390bbbe32f5727ac2f38dbbbde140b.tar.gz
fml8-e0c6c7bff4390bbbe32f5727ac2f38dbbbde140b.tar.bz2
fml8-e0c6c7bff4390bbbe32f5727ac2f38dbbbde140b.zip
implement
config_cf_filepath($ml, $domain) is_config_cf_exist($ml, $domain)
Diffstat (limited to 'fml/lib')
-rw-r--r--fml/lib/FML/Process/Utils.pm44
1 files changed, 43 insertions, 1 deletions
diff --git a/fml/lib/FML/Process/Utils.pm b/fml/lib/FML/Process/Utils.pm
index 7ec36e29..85d6fbf0 100644
--- a/fml/lib/FML/Process/Utils.pm
+++ b/fml/lib/FML/Process/Utils.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: Utils.pm,v 1.18 2002/04/07 05:27:19 fukachan Exp $
+# $FML: Utils.pm,v 1.19 2002/04/15 10:29:44 fukachan Exp $
#
package FML::Process::Utils;
@@ -373,6 +373,48 @@ sub __ml_home_prefix_search_in_virtual_maps
}
+=head2 config_cf_filepath($ml, $domain)
+
+return config.cf path for this $ml ($ml@$domain).
+
+=head2 is_config_cf_exist($ml, $domain)
+
+return 1 if config.cf exists. 0 if not.
+
+=cut
+
+
+# Descriptions: return $ml ML's home directory
+# Arguments: OBJ($curproc) STR($ml) STR($domain)
+# Side Effects: none
+# Return Value: STR
+sub config_cf_filepath
+{
+ my ($curproc, $ml, $domain) = @_;
+ my $prefix = $curproc->ml_home_prefix($domain);
+
+ unless (defined $ml) {
+ $ml = $curproc->{ config }->{ ml_name };
+ }
+
+ use File::Spec;
+ return File::Spec->catfile($prefix, $ml, "config.cf");
+}
+
+
+# Descriptions: return $ml ML's home directory
+# Arguments: OBJ($curproc) STR($ml) STR($domain)
+# Side Effects: none
+# Return Value: STR
+sub is_config_cf_exist
+{
+ my ($curproc, $ml, $domain) = @_;
+ my $f = $curproc->config_cf_filepath($ml, $domain);
+
+ return ( -f $f ? 1 : 0 );
+}
+
+
=head2 get_aliases_filepath($domain)
return the file path of the alias file for this domain $domain.