diff --git a/discovery.php b/discovery.php index c21fba50e..4651c2bb4 100755 --- a/discovery.php +++ b/discovery.php @@ -29,6 +29,7 @@ $options = getopt("h:t:i:n:d::a::"); if ($options['h'] == "odd") { $options['n'] = "1"; $options['i'] = "2"; } elseif ($options['h'] == "even") { $options['n'] = "0"; $options['i'] = "2"; } elseif ($options['h'] == "all") { $where = " "; $doing = "all"; } +elseif ($options['h'] == "new") { $where = "AND `last_discovered` = NULL"; $doing = "new"; } elseif ($options['h']) { if (is_numeric($options['h'])) @@ -68,13 +69,14 @@ if (isset($options['d'])) if (!$where) { - echo("-h | Poll single device\n"); - echo("-h odd Poll odd numbered devices (same as -i 2 -n 0)\n"); - echo("-h even Poll even numbered devices (same as -i 2 -n 1)\n"); - echo("-h all Poll all devices\n\n"); - echo("-i -n Poll as instance of \n"); - echo(" Instances start at 0. 0-3 for -n 4\n\n"); - echo("-d Enable some debugging output\n"); + echo("-h | Poll single device\n"); + echo("-h odd Poll odd numbered devices (same as -i 2 -n 0)\n"); + echo("-h even Poll even numbered devices (same as -i 2 -n 1)\n"); + echo("-h all Poll all devices\n"); + echo("-h new Poll all devices that have not had a discovery run before\n\n"); + echo("-i -n Poll as instance of \n"); + echo(" Instances start at 0. 0-3 for -n 4\n\n"); + echo("-d Enable debugging output\n"); echo("\n"); echo("No polling type specified!\n"); exit;