{"action":"opened","issue":{"url":"https://api.github.com/repos/matteocorti/nagios_plugins/issues/90","labels_url":"https://api.github.com/repos/matteocorti/nagios_plugins/issues/90/labels{/name}","comments_url":"https://api.github.com/repos/matteocorti/nagios_plugins/issues/90/comments","events_url":"https://api.github.com/repos/matteocorti/nagios_plugins/issues/90/events","html_url":"https://github.com/matteocorti/nagios_plugins/issues/90","id":111831300,"number":90,"title":"Work with Amazon Linux","user":{"login":"matteocorti","id":6011536,"avatar_url":"https://avatars.githubusercontent.com/u/6011536?v=3","gravatar_id":"","url":"https://api.github.com/users/matteocorti","html_url":"https://github.com/matteocorti","followers_url":"https://api.github.com/users/matteocorti/followers","following_url":"https://api.github.com/users/matteocorti/following{/other_user}","gists_url":"https://api.github.com/users/matteocorti/gists{/gist_id}","starred_url":"https://api.github.com/users/matteocorti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matteocorti/subscriptions","organizations_url":"https://api.github.com/users/matteocorti/orgs","repos_url":"https://api.github.com/users/matteocorti/repos","events_url":"https://api.github.com/users/matteocorti/events{/privacy}","received_events_url":"https://api.github.com/users/matteocorti/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-10-16T13:25:53Z","updated_at":"2015-10-16T13:25:54Z","closed_at":null,"body":"**Original reporter**: *cott@internetstaff.com*\n\nIt'd be pretty easy to make this work with Amazon Linux. It's yum based, and can be detected by /etc/system-release.  I'm actually curious why this doesn't just \"fall-through\" to trying yum, which would also work ... up2date is getting rare. :)\n\nWorking patch (but breaks other systems, since I just changed to use the system-release file):\n\n```\n@@ -47,7 +47,7 @@\n Readonly our $YUM_RETURN_UPDATES_AVAILABLE => 100;\n Readonly our $BITS_PER_BYTE                => 8;\n \n-Readonly our $VERSION_FILE => '/etc/redhat-release';\n+Readonly our $VERSION_FILE => '/etc/system-release';\n \n # IMPORTANT: Nagios plugins could be executed using embedded perl in this case\n #            the main routine would be executed as a subroutine and all the\n@@ -660,7 +660,8 @@\n     if (   $name =~ /Fedora/mxs\n         || $name =~ /CentOS/mxs\n         || $name =~ /Scientific[ ]Linux/mxs\n-        || $name =~ /Red[ ]Hat.*[ ][56]/mxs )\n+        || $name =~ /Red[ ]Hat.*[ ][56]/mxs \n+        || $name =~ /Amazon/mxs )\n     {\n         return 'yum';\n     }\n```"}}