diff options
| author | fukachan <fukachan> | 2004-07-23 13:03:50 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2004-07-23 13:03:50 +0000 |
| commit | 8e3bb41164cda88dfd482e6ea94c679b0e474a21 (patch) | |
| tree | 8c932b732a87561e4be705f1bbaf832f4e261ee2 /fml/lib/FML/Command | |
| parent | 0ef7fe13b9f05823cea32efcacf4d77f5685ee88 (diff) | |
| download | fml8-8e3bb41164cda88dfd482e6ea94c679b0e474a21.tar.gz fml8-8e3bb41164cda88dfd482e6ea94c679b0e474a21.tar.bz2 fml8-8e3bb41164cda88dfd482e6ea94c679b0e474a21.zip | |
fix error messages
Diffstat (limited to 'fml/lib/FML/Command')
| -rw-r--r-- | fml/lib/FML/Command/Admin/changepassword.pm | 18 | ||||
| -rw-r--r-- | fml/lib/FML/Command/Admin/mergeml.pm | 10 |
2 files changed, 17 insertions, 11 deletions
diff --git a/fml/lib/FML/Command/Admin/changepassword.pm b/fml/lib/FML/Command/Admin/changepassword.pm index cea5baa6..ea6f718c 100644 --- a/fml/lib/FML/Command/Admin/changepassword.pm +++ b/fml/lib/FML/Command/Admin/changepassword.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: changepassword.pm,v 1.13 2004/04/28 04:10:36 fukachan Exp $ +# $FML: changepassword.pm,v 1.14 2004/04/30 13:38:35 fukachan Exp $ # package FML::Command::Admin::changepassword; @@ -15,7 +15,7 @@ use Carp; =head1 NAME -FML::Command::Admin::changepassword - change remote administrator password +FML::Command::Admin::changepassword - change remote administrator password. =head1 SYNOPSIS @@ -23,7 +23,7 @@ See C<FML::Command> for more details. =head1 DESCRIPTION -password a new address. +set password of a new address or change password. =head1 METHODS @@ -47,14 +47,14 @@ sub new } -# Descriptions: need lock or not +# Descriptions: need lock or not. # Arguments: none # Side Effects: none # Return Value: NUM( 1 or 0) sub need_lock { 1;} -# Descriptions: lock channel +# Descriptions: lock channel. # Arguments: none # Side Effects: none # Return Value: STR @@ -87,6 +87,7 @@ sub verify_syntax } } + # 2. check syntax of (only) command name. use FML::Command; my $dispatch = new FML::Command; return $dispatch->safe_regexp_match($curproc, $command_args, \@test); @@ -121,6 +122,7 @@ sub process $password = $options->[ 1 ]; } elsif ($options->[0]) { + # XXX-TODO really ??? # XXX special treatment only for command mails. if ($myname eq 'command' || $myname eq 'fml.pl') { my $cred = $curproc->{ credential }; @@ -144,7 +146,7 @@ sub process $password); } else { - croak("unsafe address: $address"); + croak("unsafe address"); $curproc->logerror("unsafe address: $address"); } } @@ -184,7 +186,7 @@ sub _change_password my $member_map = $config->{ primary_admin_member_map }; unless ($cred->has_address_in_map($member_map, $config, $address)) { my $r = "no such admin member"; - my $r0 = "please add the address as an admin member."; + my $r0 = "firstly, please add the address as admin member."; $curproc->reply_message_nl('error.no_such_admin_member', $r); $curproc->reply_message_nl('command.please_add_admin_member', $r0); @@ -203,7 +205,7 @@ sub _change_password } -# Descriptions: rewrite buffer to hide the password phrase in $rbuf +# Descriptions: rewrite buffer to hide the password phrase in $rbuf. # Arguments: OBJ($self) OBJ($curproc) HASH_REF($command_args) STR_REF($rbuf) # Side Effects: none # Return Value: none diff --git a/fml/lib/FML/Command/Admin/mergeml.pm b/fml/lib/FML/Command/Admin/mergeml.pm index 7e39e325..963584d4 100644 --- a/fml/lib/FML/Command/Admin/mergeml.pm +++ b/fml/lib/FML/Command/Admin/mergeml.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: mergeml.pm,v 1.1 2004/03/18 10:20:28 fukachan Exp $ +# $FML: mergeml.pm,v 1.2 2004/07/11 15:43:38 fukachan Exp $ # package FML::Command::Admin::mergeml; @@ -22,7 +22,9 @@ FML::Command::Admin::mergeml - top level dispather of configuration merge. =head1 METHODS -=head2 C<new()> +=head2 new() + +constructor. =cut @@ -91,16 +93,18 @@ sub process # get and check argument. croak("specify old \$ml_home_dir") unless $src_dir; - croak("specify directory as a argument") unless -d $src_dir; + croak("specify directory as an argument") unless -d $src_dir; # update $ml_home_prefix and $ml_home_dir to expand variables again. $config->set( 'ml_home_prefix', $ml_home_prefix ); $config->set( 'ml_home_dir', $ml_home_dir ); + # XXX-TODO: we should use ui_message() ? # HERE WE GO! my $ml_list = "$ml_name\@$ml_domain"; print STDERR "merge configurations at @$options into $ml_list\n"; + # XXX-TODO: configurable. use FML::Merge; my $merge = new FML::Merge $curproc, $params; $merge->set_target_system("fml4"); |
