Check-in Number:
|
4659 | |
Date: |
2004-Jul-30 11:25:11 (local)
2004-Jul-30 09:25:11 (UTC) |
User: | thl |
Branch: | |
Comment: |
get rid of perl warnings when $cmd contains a % |
Tickets: |
|
Inspections: |
|
Files: |
|
ossp-pkg/snmpdx/snmpdx.pl 1.12 -> 1.13
--- snmpdx.pl 2004/07/28 13:00:58 1.12
+++ snmpdx.pl 2004/07/30 09:25:11 1.13
@@ -203,11 +203,11 @@
$expires = "1m" if (not defined($expires));
my $result = $self->{-cache}->fetch($cmd);
if (defined($result)) {
- $self->{-log}->printf(4, "system: run: \"$cmd\" ($expires) [CACHE HIT]");
+ $self->{-log}->printf(4, "system: run: \"%s\" ($expires) [CACHE HIT]", $cmd);
}
else {
- $self->{-log}->printf(3, "system: run: \"$cmd\" ($expires) [CACHE MISS]");
- $self->{-log}->printf(5, "system: executing command: \"$cmd\"");
+ $self->{-log}->printf(3, "system: run: \"%s\" ($expires) [CACHE MISS]", $cmd);
+ $self->{-log}->printf(5, "system: executing command: \"%s\"", $cmd);
$result = { -stdout => '', -rv => 0 };
$result->{-stdout} = `$cmd 2>/dev/null`;
$result->{-rv} = ($? >> 8);
|
|