addhost: make transport list dynamic

git-svn-id: http://www.observium.org/svn/observer/trunk@1863 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Tom Laermans
2011-03-16 00:50:17 +00:00
parent b0ed81624c
commit b07db6b09f

View File

@@ -23,7 +23,8 @@ if (isset($argv[1]) && $argv[1])
$transport = $argv[5];
if (!$snmpver) $snmpver = "v2c";
if ($community) {
if ($community)
{
unset($config['snmp']['community']);
$config['snmp']['community'][] = $community;
}
@@ -51,6 +52,6 @@ if (isset($argv[1]) && $argv[1])
} else { echo("Could not ping $host\n"); }
} else { echo("Could not resolve $host\n"); }
} else { echo("Already got host $host\n"); }
} else { echo("Add Host Tool\nUsage: ./addhost.php <hostname> [community] [v1|v2c] [port] [udp|udp6|tcp|tcp6]\n"); }
} else { echo("Add Host Tool\nUsage: ./addhost.php <hostname> [community] [v1|v2c] [port] [" . join("|",$config['snmp']['transports']) . "]\n"); }
?>
?>