diff options
| author | fukachan <fukachan> | 2002-02-03 12:30:29 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2002-02-03 12:30:29 +0000 |
| commit | 0c139b006cfff447ecc455d0117faed546d5f5a8 (patch) | |
| tree | a7ef9a43f043d439733b5bb02705fc56414ff10a /fml/lib/FML/Command | |
| parent | 338a420fd491504401968c0c8d06834215bdea0a (diff) | |
| download | fml8-0c139b006cfff447ecc455d0117faed546d5f5a8.tar.gz fml8-0c139b006cfff447ecc455d0117faed546d5f5a8.tar.bz2 fml8-0c139b006cfff447ecc455d0117faed546d5f5a8.zip | |
we should not use $curproc->{ main_cf } directrly in modules out of FML::Process::
we implement the following methods in FML::Process::Utils and use them.
o $curproc->executable_prefix()
o $curproc->template_files_dir_for_newml()
Diffstat (limited to 'fml/lib/FML/Command')
| -rw-r--r-- | fml/lib/FML/Command/Admin/newml.pm | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/fml/lib/FML/Command/Admin/newml.pm b/fml/lib/FML/Command/Admin/newml.pm index 71807b44..b8856634 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.10 2002/01/27 15:04:36 fukachan Exp $ +# $FML: newml.pm,v 1.11 2002/02/03 12:11:55 fukachan Exp $ # package FML::Command::Admin::newml; @@ -51,11 +51,10 @@ sub process { my ($self, $curproc, $command_args) = @_; my $config = $curproc->{ 'config' }; - my $main_cf = $curproc->{ 'main_cf' }; my ($ml_name, $ml_domain, $ml_home_prefix, $ml_home_dir) = $self->_get_domain_info($curproc, $command_args); my $params = { - executable_prefix => $main_cf->{ executable_prefix }, + executable_prefix => $curproc->executable_prefix(), ml_name => $ml_name, ml_domain => $ml_domain, ml_home_prefix => $ml_home_prefix, @@ -75,10 +74,9 @@ sub process mkdirhier( $ml_home_dir, $config->{ default_dir_mode } || 0755 ); - my $default_config_dir = $main_cf->{ 'default_config_dir' }; - + my $template_dir = $curproc->template_files_dir_for_newml(); for my $file (qw(config.cf include include-ctl)) { - my $src = File::Spec->catfile($default_config_dir, $file); + my $src = File::Spec->catfile($template_dir, $file); my $dst = File::Spec->catfile($ml_home_dir, $file); print STDERR "installing $dst\n"; |
