{"action":"created","issue":{"url":"https://api.github.com/repos/DisplayLink/evdi/issues/11","repository_url":"https://api.github.com/repos/DisplayLink/evdi","labels_url":"https://api.github.com/repos/DisplayLink/evdi/issues/11/labels{/name}","comments_url":"https://api.github.com/repos/DisplayLink/evdi/issues/11/comments","events_url":"https://api.github.com/repos/DisplayLink/evdi/issues/11/events","html_url":"https://github.com/DisplayLink/evdi/issues/11","id":137156343,"number":11,"title":"Fix for displaylink-installer.sh","user":{"login":"benmccann","id":322311,"avatar_url":"https://avatars.githubusercontent.com/u/322311?v=3","gravatar_id":"","url":"https://api.github.com/users/benmccann","html_url":"https://github.com/benmccann","followers_url":"https://api.github.com/users/benmccann/followers","following_url":"https://api.github.com/users/benmccann/following{/other_user}","gists_url":"https://api.github.com/users/benmccann/gists{/gist_id}","starred_url":"https://api.github.com/users/benmccann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benmccann/subscriptions","organizations_url":"https://api.github.com/users/benmccann/orgs","repos_url":"https://api.github.com/users/benmccann/repos","events_url":"https://api.github.com/users/benmccann/events{/privacy}","received_events_url":"https://api.github.com/users/benmccann/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-02-29T05:31:37Z","updated_at":"2016-03-31T14:02:52Z","closed_at":"2016-03-17T15:24:31Z","body":"Here's an improved version of `detect_distro` which makes it work not only on Ubuntu, but also on forks of Ubuntu such as Linux Mint, Elementary OS, etc. I'm sending this patch using my external monitor powered by DisplayLink on Linux Mint :-)\r\n\r\n```bash\r\ndetect_distro()\r\n{\r\n  if which lsb_release >/dev/null; then\r\n    lsb_release -u > /dev/null 2>&1\r\n    lsb_release_exit_code=$?\r\n    if [ \"$lsb_release_exit_code\" = \"0\" ]; then\r\n      # if this is a fork then use -u to find upstream version\r\n      local R=$(lsb_release -d -s -u)\r\n    else\r\n      local R=$(lsb_release -d -s)\r\n    fi\r\n    echo \"Distribution discovered: $R\"\r\n    if [ -z \"${R##Ubuntu 14.*}\" ]; then\r\n      SYSTEMINITDAEMON=upstart\r\n    elif [ -z \"${R##Ubuntu 15.*}\" ]; then\r\n      SYSTEMINITDAEMON=systemd\r\n    else\r\n      echo \"none\"\r\n    fi\r\n  else\r\n    echo \"WARNING: Unknown distribution, assuming defaults - this may fail.\" >&2\r\n  fi\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/DisplayLink/evdi/issues/comments/203954008","html_url":"https://github.com/DisplayLink/evdi/issues/11#issuecomment-203954008","issue_url":"https://api.github.com/repos/DisplayLink/evdi/issues/11","id":203954008,"user":{"login":"benmccann","id":322311,"avatar_url":"https://avatars.githubusercontent.com/u/322311?v=3","gravatar_id":"","url":"https://api.github.com/users/benmccann","html_url":"https://github.com/benmccann","followers_url":"https://api.github.com/users/benmccann/followers","following_url":"https://api.github.com/users/benmccann/following{/other_user}","gists_url":"https://api.github.com/users/benmccann/gists{/gist_id}","starred_url":"https://api.github.com/users/benmccann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benmccann/subscriptions","organizations_url":"https://api.github.com/users/benmccann/orgs","repos_url":"https://api.github.com/users/benmccann/repos","events_url":"https://api.github.com/users/benmccann/events{/privacy}","received_events_url":"https://api.github.com/users/benmccann/received_events","type":"User","site_admin":false},"created_at":"2016-03-31T14:02:52Z","updated_at":"2016-03-31T14:02:52Z","body":"@unfulvio just replace the `detect_distro` in the original script with the one I pasted just above"}}