diff options
| author | fukachan <fukachan> | 2003-02-05 03:11:03 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2003-02-05 03:11:03 +0000 |
| commit | f28720b944ad1819ed3a758a672efe156775c6b0 (patch) | |
| tree | b27991e3a27437173dd8296f1bfd4671f7eb49a7 /fml/lib/FML/Process/Command.pm | |
| parent | 792afb7437e3a48528d6e382cd0f8f8245730a64 (diff) | |
| download | fml8-f28720b944ad1819ed3a758a672efe156775c6b0.tar.gz fml8-f28720b944ad1819ed3a758a672efe156775c6b0.tar.bz2 fml8-f28720b944ad1819ed3a758a672efe156775c6b0.zip | |
add $command_run_{start,end}_hook
Diffstat (limited to 'fml/lib/FML/Process/Command.pm')
| -rw-r--r-- | fml/lib/FML/Process/Command.pm | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/fml/lib/FML/Process/Command.pm b/fml/lib/FML/Process/Command.pm index 8278d86e..b22e6323 100644 --- a/fml/lib/FML/Process/Command.pm +++ b/fml/lib/FML/Process/Command.pm @@ -3,7 +3,7 @@ # Copyright (C) 2000,2001,2002,2003 Ken'ichi Fukamachi # All rights reserved. # -# $FML: Command.pm,v 1.80 2003/01/11 06:58:45 fukachan Exp $ +# $FML: Command.pm,v 1.81 2003/02/03 12:25:58 fukachan Exp $ # package FML::Process::Command; @@ -146,6 +146,10 @@ sub run { my ($curproc, $args) = @_; my $pcb = $curproc->{ pcb }; + my $config = $curproc->{ config }; + + my $eval = $config->get_hook( 'command_run_start_hook' ); + if ($eval) { eval qq{ $eval; }; LogWarn($@) if $@; } unless ($curproc->is_refused()) { # permit_xxx() sets the error reason at "check_restriction" in pcb. @@ -177,6 +181,11 @@ sub run Log("deny command. reason=$reason"); } } + else { + LogError("ignore this request."); + } + $eval = $config->get_hook( 'command_run_end_hook' ); + if ($eval) { eval qq{ $eval; }; LogWarn($@) if $@; } } |
