From 457babd32d87bac103a560316860adae03a7d45b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C5=82awomir=20Paszkiewicz?= Date: Fri, 9 Oct 2015 12:57:43 +0200 Subject: [PATCH] - poll devices with specified type with --type switch --- discovery.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/discovery.php b/discovery.php index ed33456d7e..c1c4ef6357 100755 --- a/discovery.php +++ b/discovery.php @@ -68,6 +68,11 @@ if (isset($options['os'])) { $doing = $options['os']; } +if (isset($options['type'])) { + $where = $where." AND type = '".$options['type']."'"; + $doing = $options['type']; +} + if (isset($options['i']) && $options['i'] && isset($options['n'])) { $where = 'AND MOD(device_id,'.$options['i'].") = '".$options['n']."'"; $doing = $options['n'].'/'.$options['i']; @@ -95,7 +100,8 @@ if (!$where) { 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"; - echo "-h [odd|even|new|all] --os Poll devices only with specified operating system\n\n"; + echo "-h [odd|even|new|all] --os Poll devices only with specified operating system\n"; + echo "-h [odd|even|new|all] --type Poll devices only with specified type\n\n"; echo "-i -n Poll as instance of \n"; echo " Instances start at 0. 0-3 for -n 4\n\n"; echo "\n";