Skip to content

Commit

Permalink
QA: Restore automation defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
TheWitness committed Oct 1, 2023
1 parent 2aabd74 commit 1f6caf4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions poller_automation.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ function sig_handler($signo) {
case '--dryrun':
$dryrun = true;

break;
case '-M':
case '--master':
$master = true;
Expand Down Expand Up @@ -195,7 +196,6 @@ function sig_handler($signo) {
display_help();

exit(0);

default:
print 'ERROR: Invalid Parameter ' . $parameter . "\n\n";
display_help();
Expand Down Expand Up @@ -733,7 +733,7 @@ function discoverDevices($network_id, $thread) {

$fos = automation_find_os($device['snmp_sysDescr'], $device['snmp_sysObjectID'], $device['snmp_sysName']);

if ($fos != false && $network['add_to_cacti'] == 'on' && $dryrun != false) {
if (is_array($fos) && $network['add_to_cacti'] == 'on' && $dryrun == false) {
automation_debug(', Template: ' . $fos['name'] . "\n");
$device['os'] = $fos['name'];
$device['host_template'] = $fos['host_template'];
Expand Down

0 comments on commit 1f6caf4

Please sign in to comment.