mirror of
https://github.com/centreon/centreon-plugins.git
synced 2025-07-24 22:25:02 +02:00
will not write into cache file if snmpwalk fails
git-svn-id: http://svn.centreon.com/trunk/plugins-2.x@10176 6bcd3966-0018-0410-8128-fd23d134de7e
This commit is contained in:
parent
4a1f7633f6
commit
48a53e0260
@ -240,6 +240,7 @@ else {
|
||||
|
||||
if ($mustCreateFile) {
|
||||
$result = $session->get_table(Baseoid => $OID_DESC);
|
||||
if (defined($result)) {
|
||||
unless (open(FILE,">".$cacheFile)){
|
||||
print "Check mod for temporary file : ".$cacheFile."...\n";
|
||||
exit $ERRORS{"UNKNOWN"};
|
||||
@ -252,6 +253,7 @@ if ($mustCreateFile) {
|
||||
print FILE $interfaceIndex.";".$result->{$key}."\n";
|
||||
}
|
||||
close(FILE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user