2011-09-02 Koichiro Kikuchi <koichiro@rworks.jp>
* pandora_agent: Now module_condition and module_precondition accept numeric parameter without fractional part. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4889 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
473590d343
commit
4107ecca62
|
@ -1,3 +1,8 @@
|
|||
2011-09-02 Koichiro Kikuchi <koichiro@rworks.jp>
|
||||
|
||||
* pandora_agent: Now module_condition and module_precondition
|
||||
accept numeric parameter without fractional part.
|
||||
|
||||
2011-08-22 Sancho Lerena <slerena@artica.es>
|
||||
|
||||
* pandora_agent.spec,
|
||||
|
|
|
@ -335,10 +335,10 @@ sub parse_conf_modules($) {
|
|||
my $action = $1;
|
||||
$module->{'precon'} = 1;
|
||||
# Numeric comparison
|
||||
if ($action =~ /^\s*([<>!=]+)\s+(\d+\.\d*)\s+(.*)$/) {
|
||||
if ($action =~ /^\s*([<>!=]+)\s+(\d+(?:\.\d*)?)\s+(.*)$/) {
|
||||
push (@{$module->{'precondition'}}, {'operator' => $1, 'value_1' => $2, 'command' => $3});
|
||||
# Interval
|
||||
} elsif ($action =~ /^\s*[(]\s*(\d+\.\d*)\s*,\s*(\d+\.\d*)\s*[)]\s+(.*)$/) {
|
||||
} elsif ($action =~ /^\s*[(]\s*(\d+(?:\.\d*)?)\s*,\s*(\d+(?:\.\d*)?)\s*[)]\s+(.*)$/) {
|
||||
push (@{$module->{'precondition'}}, {'operator' => '()', 'value_1' => $1, 'value_2' => $2, 'command' => $3});
|
||||
# Regular expression
|
||||
} elsif ($action =~ /^\s*=~\s+(\S*)\s+(.*)$/) {
|
||||
|
@ -392,10 +392,10 @@ sub parse_conf_modules($) {
|
|||
} elsif ($line =~ /^\s*module_condition\s+(.*)$/) {
|
||||
my $action = $1;
|
||||
# Numeric comparison
|
||||
if ($action =~ /^\s*([<>!=]+)\s+(\d+\.\d*)\s+(.*)$/) {
|
||||
if ($action =~ /^\s*([<>!=]+)\s+(\d+(?:\.\d*)?)\s+(.*)$/) {
|
||||
push (@{$module->{'conditions'}}, {'operator' => $1, 'value_1' => $2, 'command' => $3});
|
||||
# Interval
|
||||
} elsif ($action =~ /^\s*[(]\s*(\d+\.\d*)\s*,\s*(\d+\.\d*)\s*[)]\s+(.*)$/) {
|
||||
} elsif ($action =~ /^\s*[(]\s*(\d+(?:\.\d*)?)\s*,\s*(\d+(?:\.\d*)?)\s*[)]\s+(.*)$/) {
|
||||
push (@{$module->{'conditions'}}, {'operator' => '()', 'value_1' => $1, 'value_2' => $2, 'command' => $3});
|
||||
# Regular expression
|
||||
} elsif ($action =~ /^\s*=~\s+(\S*)\s+(.*)$/) {
|
||||
|
|
Loading…
Reference in New Issue