{"action":"created","issue":{"url":"https://api.github.com/repos/ZoneMinder/zoneminder/issues/2146","repository_url":"https://api.github.com/repos/ZoneMinder/zoneminder","labels_url":"https://api.github.com/repos/ZoneMinder/zoneminder/issues/2146/labels{/name}","comments_url":"https://api.github.com/repos/ZoneMinder/zoneminder/issues/2146/comments","events_url":"https://api.github.com/repos/ZoneMinder/zoneminder/issues/2146/events","html_url":"https://github.com/ZoneMinder/zoneminder/issues/2146","id":338830006,"node_id":"MDU6SXNzdWUzMzg4MzAwMDY=","number":2146,"title":"Excessive warnings about failing attempts to find `arp` utility","user":{"login":"onlyjob","id":1061236,"node_id":"MDQ6VXNlcjEwNjEyMzY=","avatar_url":"https://avatars0.githubusercontent.com/u/1061236?v=4","gravatar_id":"","url":"https://api.github.com/users/onlyjob","html_url":"https://github.com/onlyjob","followers_url":"https://api.github.com/users/onlyjob/followers","following_url":"https://api.github.com/users/onlyjob/following{/other_user}","gists_url":"https://api.github.com/users/onlyjob/gists{/gist_id}","starred_url":"https://api.github.com/users/onlyjob/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/onlyjob/subscriptions","organizations_url":"https://api.github.com/users/onlyjob/orgs","repos_url":"https://api.github.com/users/onlyjob/repos","events_url":"https://api.github.com/users/onlyjob/events{/privacy}","received_events_url":"https://api.github.com/users/onlyjob/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-07-06T07:11:40Z","updated_at":"2018-07-11T01:44:30Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"https://github.com/ZoneMinder/zoneminder/blob/master/web/skins/classic/views/monitorprobe.php#L300\r\n\r\nI get this warning all the time: `Unable to determine path for arp command, type -p arp returned '127'`\r\n\r\nBecause location of `arp` command can not be found like this:\r\n\r\nhttps://github.com/ZoneMinder/zoneminder/blob/master/web/skins/classic/views/monitorprobe.php#L298\r\n\r\nThere are many problems with that approach.\r\n\r\n~~~~\r\n$ sh -c 'type -p arp'; echo $?\r\n-p: not found\r\narp: not found\r\n127\r\n~~~~\r\n\r\nThat's because default non-interactive shell on Debian is _dash_ which have no `-p` option.\r\n\r\nLet's try again:\r\n\r\n~~~~\r\n$ sh -c 'type arp'; echo $?\r\narp: not found\r\n127\r\n\r\n$ bash -c 'type -p arp'; echo $?\r\n1\r\n~~~~\r\n\r\nNeither _dash_ nor _bash_ could find `arp` because it is not in user's PATH.\r\nOn Debian, `arp` is in `/usr/sbin/arp` (hence only `sudo sh -c 'type arp'` could find it).\r\n\r\nBut back to the original problem: there is no point to warn about failing attempts to locate `arp` utility if last fallback to hard-coded path works.\r\n\r\nI suggest to remove all the warnings and replace them with only one, just [before the following line](https://github.com/ZoneMinder/zoneminder/blob/master/web/skins/classic/views/monitorprobe.php#L317) to warn only if `arp` hasn't been found after all attempts.\r\n\r\n_Only one warning is enough._\r\n\r\nCurrent situation is misleading because false warning led me to believe that monitor probe is failing because of missing `arp` utility while it was actually entirely unrelated problem: #2144.\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/ZoneMinder/zoneminder/issues/comments/404018090","html_url":"https://github.com/ZoneMinder/zoneminder/issues/2146#issuecomment-404018090","issue_url":"https://api.github.com/repos/ZoneMinder/zoneminder/issues/2146","id":404018090,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNDAxODA5MA==","user":{"login":"onlyjob","id":1061236,"node_id":"MDQ6VXNlcjEwNjEyMzY=","avatar_url":"https://avatars0.githubusercontent.com/u/1061236?v=4","gravatar_id":"","url":"https://api.github.com/users/onlyjob","html_url":"https://github.com/onlyjob","followers_url":"https://api.github.com/users/onlyjob/followers","following_url":"https://api.github.com/users/onlyjob/following{/other_user}","gists_url":"https://api.github.com/users/onlyjob/gists{/gist_id}","starred_url":"https://api.github.com/users/onlyjob/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/onlyjob/subscriptions","organizations_url":"https://api.github.com/users/onlyjob/orgs","repos_url":"https://api.github.com/users/onlyjob/repos","events_url":"https://api.github.com/users/onlyjob/events{/privacy}","received_events_url":"https://api.github.com/users/onlyjob/received_events","type":"User","site_admin":false},"created_at":"2018-07-11T01:44:30Z","updated_at":"2018-07-11T01:44:30Z","author_association":"CONTRIBUTOR","body":"Indeed. :)\r\nJust as I've said, \r\n\r\n> That's because default non-interactive shell on Debian is _dash_ which have no -p option.\r\n"}}
{"actor":{"display_login":"onlyjob"}}