{"action":"created","comment":{"url":"https://api.github.com/repos/docker/machine/pulls/comments/26091790","id":26091790,"diff_hunk":"@@ -0,0 +1,37 @@\n+package os\n+\n+import (\n+\t\"strings\"\n+\n+\t\"github.com/docker/machine/drivers\"\n+)\n+\n+func init() {\n+\tRegisterRuntime(\"ubuntu\", &RegisteredRuntime{\n+\t\tDetect: UbuntuDetection,\n+\t})\n+}\n+\n+func UbuntuDetection(d drivers.Driver) (*Runtime, error) {\n+\tout, err := sshCommand(d, \"lsb_release -i | cut -f2 -d:\")","path":"machine/os/ubuntu.go","position":16,"original_position":16,"commit_id":"6e3dc76b436790c70a1af9e73b7d11524c042bb2","original_commit_id":"6e3dc76b436790c70a1af9e73b7d11524c042bb2","user":{"login":"nathanleclaire","id":1476820,"avatar_url":"https://avatars.githubusercontent.com/u/1476820?v=3","gravatar_id":"","url":"https://api.github.com/users/nathanleclaire","html_url":"https://github.com/nathanleclaire","followers_url":"https://api.github.com/users/nathanleclaire/followers","following_url":"https://api.github.com/users/nathanleclaire/following{/other_user}","gists_url":"https://api.github.com/users/nathanleclaire/gists{/gist_id}","starred_url":"https://api.github.com/users/nathanleclaire/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nathanleclaire/subscriptions","organizations_url":"https://api.github.com/users/nathanleclaire/orgs","repos_url":"https://api.github.com/users/nathanleclaire/repos","events_url":"https://api.github.com/users/nathanleclaire/events{/privacy}","received_events_url":"https://api.github.com/users/nathanleclaire/received_events","type":"User","site_admin":false},"body":"@sthulb  The success or failure of running commands like `'cat /etc/os-release | egrep ^ID=boot2docker'` is probably what we're after, then.  I have to admit it's pretty tempting to just run `cat /etc/os-release | egrep ^ID` once and then do a pattern match on the output once instead of running a command over SSH for each possible driver though :)","created_at":"2015-03-10T00:58:36Z","updated_at":"2015-03-10T00:58:36Z","html_url":"https://github.com/docker/machine/pull/546#discussion_r26091790","pull_request_url":"https://api.github.com/repos/docker/machine/pulls/546","_links":{"self":{"href":"https://api.github.com/repos/docker/machine/pulls/comments/26091790"},"html":{"href":"https://github.com/docker/machine/pull/546#discussion_r26091790"},"pull_request":{"href":"https://api.github.com/repos/docker/machine/pulls/546"}}},"pull_request":{"url":"https://api.github.com/repos/docker/machine/pulls/546","id":29407244,"html_url":"https://github.com/docker/machine/pull/546","diff_url":"https://github.com/docker/machine/pull/546.diff","patch_url":"https://github.com/docker/machine/pull/546.patch","issue_url":"https://api.github.com/repos/docker/machine/issues/546","number":546,"state":"open","locked":false,"title":"WIP: OS abstraction","user":{"login":"sthulb","id":103217,"avatar_url":"https://avatars.githubusercontent.com/u/103217?v=3","gravatar_id":"","url":"https://api.github.com/users/sthulb","html_url":"https://github.com/sthulb","followers_url":"https://api.github.com/users/sthulb/followers","following_url":"https://api.github.com/users/sthulb/following{/other_user}","gists_url":"https://api.github.com/users/sthulb/gists{/gist_id}","starred_url":"https://api.github.com/users/sthulb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sthulb/subscriptions","organizations_url":"https://api.github.com/users/sthulb/orgs","repos_url":"https://api.github.com/users/sthulb/repos","events_url":"https://api.github.com/users/sthulb/events{/privacy}","received_events_url":"https://api.github.com/users/sthulb/received_events","type":"User","site_admin":false},"body":" - Creates interface for an OS runtime\r\n - Creates a way of registering a runtime\r\n\r\nSigned-off-by: Simon Thulbourn <simon+github@thulbourn.com>","created_at":"2015-02-16T23:18:19Z","updated_at":"2015-03-10T00:58:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"600881fa1e86a6420208c99170daf9d05bf613b2","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/docker/machine/pulls/546/commits","review_comments_url":"https://api.github.com/repos/docker/machine/pulls/546/comments","review_comment_url":"https://api.github.com/repos/docker/machine/pulls/comments{/number}","comments_url":"https://api.github.com/repos/docker/machine/issues/546/comments","statuses_url":"https://api.github.com/repos/docker/machine/statuses/6e3dc76b436790c70a1af9e73b7d11524c042bb2","head":{"label":"sthulb:os-abstraction","ref":"os-abstraction","sha":"6e3dc76b436790c70a1af9e73b7d11524c042bb2","user":{"login":"sthulb","id":103217,"avatar_url":"https://avatars.githubusercontent.com/u/103217?v=3","gravatar_id":"","url":"https://api.github.com/users/sthulb","html_url":"https://github.com/sthulb","followers_url":"https://api.github.com/users/sthulb/followers","following_url":"https://api.github.com/users/sthulb/following{/other_user}","gists_url":"https://api.github.com/users/sthulb/gists{/gist_id}","starred_url":"https://api.github.com/users/sthulb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sthulb/subscriptions","organizations_url":"https://api.github.com/users/sthulb/orgs","repos_url":"https://api.github.com/users/sthulb/repos","events_url":"https://api.github.com/users/sthulb/events{/privacy}","received_events_url":"https://api.github.com/users/sthulb/received_events","type":"User","site_admin":false},"repo":{"id":27667591,"name":"machine","full_name":"sthulb/machine","owner":{"login":"sthulb","id":103217,"avatar_url":"https://avatars.githubusercontent.com/u/103217?v=3","gravatar_id":"","url":"https://api.github.com/users/sthulb","html_url":"https://github.com/sthulb","followers_url":"https://api.github.com/users/sthulb/followers","following_url":"https://api.github.com/users/sthulb/following{/other_user}","gists_url":"https://api.github.com/users/sthulb/gists{/gist_id}","starred_url":"https://api.github.com/users/sthulb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sthulb/subscriptions","organizations_url":"https://api.github.com/users/sthulb/orgs","repos_url":"https://api.github.com/users/sthulb/repos","events_url":"https://api.github.com/users/sthulb/events{/privacy}","received_events_url":"https://api.github.com/users/sthulb/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sthulb/machine","description":"Machine management for a container-centric world","fork":true,"url":"https://api.github.com/repos/sthulb/machine","forks_url":"https://api.github.com/repos/sthulb/machine/forks","keys_url":"https://api.github.com/repos/sthulb/machine/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sthulb/machine/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sthulb/machine/teams","hooks_url":"https://api.github.com/repos/sthulb/machine/hooks","issue_events_url":"https://api.github.com/repos/sthulb/machine/issues/events{/number}","events_url":"https://api.github.com/repos/sthulb/machine/events","assignees_url":"https://api.github.com/repos/sthulb/machine/assignees{/user}","branches_url":"https://api.github.com/repos/sthulb/machine/branches{/branch}","tags_url":"https://api.github.com/repos/sthulb/machine/tags","blobs_url":"https://api.github.com/repos/sthulb/machine/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sthulb/machine/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sthulb/machine/git/refs{/sha}","trees_url":"https://api.github.com/repos/sthulb/machine/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sthulb/machine/statuses/{sha}","languages_url":"https://api.github.com/repos/sthulb/machine/languages","stargazers_url":"https://api.github.com/repos/sthulb/machine/stargazers","contributors_url":"https://api.github.com/repos/sthulb/machine/contributors","subscribers_url":"https://api.github.com/repos/sthulb/machine/subscribers","subscription_url":"https://api.github.com/repos/sthulb/machine/subscription","commits_url":"https://api.github.com/repos/sthulb/machine/commits{/sha}","git_commits_url":"https://api.github.com/repos/sthulb/machine/git/commits{/sha}","comments_url":"https://api.github.com/repos/sthulb/machine/comments{/number}","issue_comment_url":"https://api.github.com/repos/sthulb/machine/issues/comments{/number}","contents_url":"https://api.github.com/repos/sthulb/machine/contents/{+path}","compare_url":"https://api.github.com/repos/sthulb/machine/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sthulb/machine/merges","archive_url":"https://api.github.com/repos/sthulb/machine/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sthulb/machine/downloads","issues_url":"https://api.github.com/repos/sthulb/machine/issues{/number}","pulls_url":"https://api.github.com/repos/sthulb/machine/pulls{/number}","milestones_url":"https://api.github.com/repos/sthulb/machine/milestones{/number}","notifications_url":"https://api.github.com/repos/sthulb/machine/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sthulb/machine/labels{/name}","releases_url":"https://api.github.com/repos/sthulb/machine/releases{/id}","created_at":"2014-12-07T11:12:49Z","updated_at":"2015-02-03T17:17:17Z","pushed_at":"2015-03-09T11:51:17Z","git_url":"git://github.com/sthulb/machine.git","ssh_url":"git@github.com:sthulb/machine.git","clone_url":"https://github.com/sthulb/machine.git","svn_url":"https://github.com/sthulb/machine","homepage":null,"size":3261,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"docker:master","ref":"master","sha":"d674e87813ffc10048f55d884396be1af327705e","user":{"login":"docker","id":5429470,"avatar_url":"https://avatars.githubusercontent.com/u/5429470?v=3","gravatar_id":"","url":"https://api.github.com/users/docker","html_url":"https://github.com/docker","followers_url":"https://api.github.com/users/docker/followers","following_url":"https://api.github.com/users/docker/following{/other_user}","gists_url":"https://api.github.com/users/docker/gists{/gist_id}","starred_url":"https://api.github.com/users/docker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/docker/subscriptions","organizations_url":"https://api.github.com/users/docker/orgs","repos_url":"https://api.github.com/users/docker/repos","events_url":"https://api.github.com/users/docker/events{/privacy}","received_events_url":"https://api.github.com/users/docker/received_events","type":"Organization","site_admin":false},"repo":{"id":27494663,"name":"machine","full_name":"docker/machine","owner":{"login":"docker","id":5429470,"avatar_url":"https://avatars.githubusercontent.com/u/5429470?v=3","gravatar_id":"","url":"https://api.github.com/users/docker","html_url":"https://github.com/docker","followers_url":"https://api.github.com/users/docker/followers","following_url":"https://api.github.com/users/docker/following{/other_user}","gists_url":"https://api.github.com/users/docker/gists{/gist_id}","starred_url":"https://api.github.com/users/docker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/docker/subscriptions","organizations_url":"https://api.github.com/users/docker/orgs","repos_url":"https://api.github.com/users/docker/repos","events_url":"https://api.github.com/users/docker/events{/privacy}","received_events_url":"https://api.github.com/users/docker/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/docker/machine","description":"Machine management for a container-centric world","fork":false,"url":"https://api.github.com/repos/docker/machine","forks_url":"https://api.github.com/repos/docker/machine/forks","keys_url":"https://api.github.com/repos/docker/machine/keys{/key_id}","collaborators_url":"https://api.github.com/repos/docker/machine/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/docker/machine/teams","hooks_url":"https://api.github.com/repos/docker/machine/hooks","issue_events_url":"https://api.github.com/repos/docker/machine/issues/events{/number}","events_url":"https://api.github.com/repos/docker/machine/events","assignees_url":"https://api.github.com/repos/docker/machine/assignees{/user}","branches_url":"https://api.github.com/repos/docker/machine/branches{/branch}","tags_url":"https://api.github.com/repos/docker/machine/tags","blobs_url":"https://api.github.com/repos/docker/machine/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/docker/machine/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/docker/machine/git/refs{/sha}","trees_url":"https://api.github.com/repos/docker/machine/git/trees{/sha}","statuses_url":"https://api.github.com/repos/docker/machine/statuses/{sha}","languages_url":"https://api.github.com/repos/docker/machine/languages","stargazers_url":"https://api.github.com/repos/docker/machine/stargazers","contributors_url":"https://api.github.com/repos/docker/machine/contributors","subscribers_url":"https://api.github.com/repos/docker/machine/subscribers","subscription_url":"https://api.github.com/repos/docker/machine/subscription","commits_url":"https://api.github.com/repos/docker/machine/commits{/sha}","git_commits_url":"https://api.github.com/repos/docker/machine/git/commits{/sha}","comments_url":"https://api.github.com/repos/docker/machine/comments{/number}","issue_comment_url":"https://api.github.com/repos/docker/machine/issues/comments{/number}","contents_url":"https://api.github.com/repos/docker/machine/contents/{+path}","compare_url":"https://api.github.com/repos/docker/machine/compare/{base}...{head}","merges_url":"https://api.github.com/repos/docker/machine/merges","archive_url":"https://api.github.com/repos/docker/machine/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/docker/machine/downloads","issues_url":"https://api.github.com/repos/docker/machine/issues{/number}","pulls_url":"https://api.github.com/repos/docker/machine/pulls{/number}","milestones_url":"https://api.github.com/repos/docker/machine/milestones{/number}","notifications_url":"https://api.github.com/repos/docker/machine/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/docker/machine/labels{/name}","releases_url":"https://api.github.com/repos/docker/machine/releases{/id}","created_at":"2014-12-03T15:52:06Z","updated_at":"2015-03-10T00:56:29Z","pushed_at":"2015-03-09T22:52:59Z","git_url":"git://github.com/docker/machine.git","ssh_url":"git@github.com:docker/machine.git","clone_url":"https://github.com/docker/machine.git","svn_url":"https://github.com/docker/machine","homepage":"https://docs.docker.com/machine/","size":17934,"stargazers_count":1471,"watchers_count":1471,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":209,"mirror_url":null,"open_issues_count":161,"forks":209,"open_issues":161,"watchers":1471,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/docker/machine/pulls/546"},"html":{"href":"https://github.com/docker/machine/pull/546"},"issue":{"href":"https://api.github.com/repos/docker/machine/issues/546"},"comments":{"href":"https://api.github.com/repos/docker/machine/issues/546/comments"},"review_comments":{"href":"https://api.github.com/repos/docker/machine/pulls/546/comments"},"review_comment":{"href":"https://api.github.com/repos/docker/machine/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/docker/machine/pulls/546/commits"},"statuses":{"href":"https://api.github.com/repos/docker/machine/statuses/6e3dc76b436790c70a1af9e73b7d11524c042bb2"}}}}