summaryrefslogtreecommitdiff
path: root/fml/lib
diff options
context:
space:
mode:
authorfukachan <fukachan>2003-02-13 14:40:43 +0000
committerfukachan <fukachan>2003-02-13 14:40:43 +0000
commit4eb48f464550764d8b970e83720bcf8be5d19e22 (patch)
tree4ba24ce80a4404a0f00856000a89cd3b91ede390 /fml/lib
parent6ca39e4ba5f551e02cb754b6e5b134e902b768a9 (diff)
downloadfml8-4eb48f464550764d8b970e83720bcf8be5d19e22.tar.gz
fml8-4eb48f464550764d8b970e83720bcf8be5d19e22.tar.bz2
fml8-4eb48f464550764d8b970e83720bcf8be5d19e22.zip
validate $ml_name existence firstly.
Diffstat (limited to 'fml/lib')
-rw-r--r--fml/lib/FML/Command/Admin/check.pm11
1 files changed, 8 insertions, 3 deletions
diff --git a/fml/lib/FML/Command/Admin/check.pm b/fml/lib/FML/Command/Admin/check.pm
index 5218dcaa..489f5bfa 100644
--- a/fml/lib/FML/Command/Admin/check.pm
+++ b/fml/lib/FML/Command/Admin/check.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: check.pm,v 1.5 2002/09/24 14:23:12 fukachan Exp $
+# $FML: check.pm,v 1.6 2002/12/15 13:46:28 fukachan Exp $
#
package FML::Command::Admin::check;
@@ -61,9 +61,14 @@ my @rules = qw(
sub process
{
my ($self, $curproc, $command_args) = @_;
- my $config = $curproc->{ config };
+ my $ml_name = $curproc->ml_name();
+ my $ml_domain = $curproc->ml_domain();
+ my $ml_home_dir = $curproc->ml_home_dir($ml_name, $ml_domain);
- # XXX-TODO validate $ml_name existence firstly.
+ # validate $ml_name existence firstly.
+ unless (-d $ml_home_dir) {
+ croak("no such ml: $ml_name\@$ml_domain");
+ }
for my $rule (@rules) {
$self->$rule($curproc, $command_args);