| 71 |
#### Getting Version Method #### |
#### Getting Version Method #### |
| 72 |
# latest version |
# latest version |
| 73 |
# command to get |
# command to get |
| 74 |
#$Setting->{version}->{latest}->{command} = [qw(host -t txt current.cvd.clamav.net)]; |
#$Setting{version}->{latest}->{command} = [qw(host -t txt current.cvd.clamav.net)]; |
| 75 |
|
|
| 76 |
# the regular expression that is applied to command output |
# the regular expression that is applied to command output |
| 77 |
#$Setting->{version}->{latest}->{regexp} = qr/"(\d+(?:\.\d+)*):\d+:\d+:\d+:[^"]*"\s*$/; |
#$Setting{version}->{latest}->{regexp} = qr/"(\d+(?:\.\d+)*):\d+:\d+:\d+:[^"]*"\s*$/; |
| 78 |
|
|
| 79 |
# current version |
# current version |
| 80 |
# command to get |
# command to get |
| 81 |
#$Setting->{version}->{current}->{command} = [qw(clamav-config --version)]; |
#$Setting{version}->{current}->{command} = [qw(clamav-config --version)]; |
| 82 |
|
|
| 83 |
# the regular expression that is applied to command output |
# the regular expression that is applied to command output |
| 84 |
#$Setting->{version}->{current}->{regexp} = qr/^(\d+(?:\.\d+)*)\s*$/; |
#$Setting{version}->{current}->{regexp} = qr/^(\d+(?:\.\d+)*)\s*$/; |
| 85 |
|
|
| 86 |
# version string compare function |
# version string compare function |
| 87 |
#$Setting->{version}->{compare} = sub { |
#$Setting{version}->{compare} = sub { |
| 88 |
# my ($a, $b) = @_; |
# my ($a, $b) = @_; |
| 89 |
# my @a = reverse(split(/\./, $a)); |
# my @a = reverse(split(/\./, $a)); |
| 90 |
# my @b = reverse(split(/\./, $b)); |
# my @b = reverse(split(/\./, $b)); |
| 135 |
|
|
| 136 |
# update limit |
# update limit |
| 137 |
# version supremum |
# version supremum |
| 138 |
#$Setting->{option}->{limit}->{version} = undef; |
#$Setting{option}->{limit}->{version} = undef; |
| 139 |
|
|
| 140 |
# phase name for limited action |
# phase name for limited action |
| 141 |
#$Setting->{option}->{limit}->{action} = undef; |
#$Setting{option}->{limit}->{action} = undef; |
| 142 |
|
|
| 143 |
|
|
| 144 |
#### Update Phases Sepcification #### |
#### Update Phases Sepcification #### |