summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfukachan <fukachan>2002-06-25 12:36:51 +0000
committerfukachan <fukachan>2002-06-25 12:36:51 +0000
commit112fe17f5c270030eef5202379f57144c3d49a6d (patch)
tree8fb60863db3a3436f54114ac14dda2facb071362
parentc57043995f748774bc7741d4be64c5f0bed84c80 (diff)
downloadfml8-bootstrap-20020626.tar.gz
fml8-bootstrap-20020626.tar.bz2
fml8-bootstrap-20020626.zip
clean up. nuke _get_domain_info (not used)bootstrap-20020626
-rw-r--r--fml/lib/FML/Command/Admin/rmml.pm47
1 files changed, 8 insertions, 39 deletions
diff --git a/fml/lib/FML/Command/Admin/rmml.pm b/fml/lib/FML/Command/Admin/rmml.pm
index 343648f2..c0acd74a 100644
--- a/fml/lib/FML/Command/Admin/rmml.pm
+++ b/fml/lib/FML/Command/Admin/rmml.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: rmml.pm,v 1.3 2002/04/24 03:59:15 fukachan Exp $
+# $FML: rmml.pm,v 1.4 2002/06/25 09:38:09 fukachan Exp $
#
package FML::Command::Admin::rmml;
@@ -81,16 +81,17 @@ sub process
};
# fundamental check
- croak("\$ml_name is not specified") unless $ml_name;
+ croak("\$ml_name is not specified") unless $ml_name;
croak("\$ml_home_dir is not specified") unless $ml_home_dir;
# update $ml_home_prefix and expand variables again.
$config->set( 'ml_home_prefix' , $ml_home_prefix );
- # "makefml --force rmml elena" makes elena ML even if elena
- # already exists.
+ # check if $ml_name already exists.
my $found = 0;
- unless (defined $options->{ force } ) {
+
+ # --force: ignore the existence of $ml_home_dir
+ unless (defined $options->{ force }) {
if (-d $ml_home_dir) {
$found = 1;
}
@@ -109,43 +110,11 @@ sub process
if (-d $removed_dir && (! -d $ml_home_dir)) {
print STDERR "$ml_name home_dir removed.\n";
}
-
- $self->_update_aliases($curproc, $command_args, $params);
-}
-
-
-# Descriptions: check argument and prepare virtual domain information
-# if needed.
-# Arguments: OBJ($self) OBJ($curproc) HASH_REF($command_args)
-# Side Effects: none
-# Return Value: ARRAY
-sub _get_domain_info
-{
- my ($self, $curproc, $command_args) = @_;
- my $ml_name = $command_args->{ 'ml_name' };
- my $ml_domain = $curproc->default_domain();
- my $ml_home_prefix = '';
- my $ml_home_dir = '';
-
- # virtual domain support e.g. "makefml newml elena@nuinui.net"
- if ($ml_name =~ /\@/o) {
- # overwrite $ml_name
- ($ml_name, $ml_domain) = split(/\@/, $ml_name);
- $ml_home_prefix = $curproc->ml_home_prefix($ml_domain);
- }
- # default domain: e.g. "makefml newml elena"
else {
- $ml_home_prefix = $curproc->ml_home_prefix();
+ print STDERR "cannot rmdir $ml_name home_dir.\n";
}
- eval q{ use File::Spec;};
- $ml_home_dir = File::Spec->catfile($ml_home_prefix, $ml_name);
-
- # save for convenience
- $self->{ _ml_name } = $ml_name;
- $self->{ _ml_domain } = $ml_domain;
-
- return ($ml_name, $ml_domain, $ml_home_prefix, $ml_home_dir);
+ $self->_update_aliases($curproc, $command_args, $params);
}