{"action":"created","comment":{"url":"https://api.github.com/repos/docker/docker/pulls/comments/31252465","id":31252465,"diff_hunk":"@@ -39,18 +39,19 @@ if [ -f /etc/default/$BASE ]; then\n \t. /etc/default/$BASE\n fi\n \n-# see also init_is_upstart in /lib/lsb/init-functions (which isn't available in Ubuntu 12.04, or we'd use it)\n-if [ -x /sbin/initctl ] && /sbin/initctl version 2>/dev/null | grep -q upstart; then\n-\tlog_failure_msg \"$DOCKER_DESC is managed via upstart, try using service $BASE $1\"\n-\texit 1\n-fi\n-\n # Check docker is present\n if [ ! -x $DOCKER ]; then\n \tlog_failure_msg \"$DOCKER not present or not executable\"\n \texit 1\n fi\n \n+check_init() {\n+\t if [ -x /sbin/initctl ] && /sbin/initctl version 2>/dev/null | grep -q upstart; then        ","path":"contrib/init/sysvinit-debian/docker","position":17,"original_position":17,"commit_id":"22800d6f51ee1c16c7c1fbb787bea473fc9a6775","original_commit_id":"22800d6f51ee1c16c7c1fbb787bea473fc9a6775","user":{"login":"stevenbrichards","id":430428,"avatar_url":"https://avatars.githubusercontent.com/u/430428?v=3","gravatar_id":"","url":"https://api.github.com/users/stevenbrichards","html_url":"https://github.com/stevenbrichards","followers_url":"https://api.github.com/users/stevenbrichards/followers","following_url":"https://api.github.com/users/stevenbrichards/following{/other_user}","gists_url":"https://api.github.com/users/stevenbrichards/gists{/gist_id}","starred_url":"https://api.github.com/users/stevenbrichards/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevenbrichards/subscriptions","organizations_url":"https://api.github.com/users/stevenbrichards/orgs","repos_url":"https://api.github.com/users/stevenbrichards/repos","events_url":"https://api.github.com/users/stevenbrichards/events{/privacy}","received_events_url":"https://api.github.com/users/stevenbrichards/received_events","type":"User","site_admin":false},"body":"Yea good call, give me a few minutes and I'll push it up","created_at":"2015-05-28T16:35:17Z","updated_at":"2015-05-28T16:35:17Z","html_url":"https://github.com/docker/docker/pull/13039#discussion_r31252465","pull_request_url":"https://api.github.com/repos/docker/docker/pulls/13039","_links":{"self":{"href":"https://api.github.com/repos/docker/docker/pulls/comments/31252465"},"html":{"href":"https://github.com/docker/docker/pull/13039#discussion_r31252465"},"pull_request":{"href":"https://api.github.com/repos/docker/docker/pulls/13039"}}},"pull_request":{"url":"https://api.github.com/repos/docker/docker/pulls/13039","id":34874473,"html_url":"https://github.com/docker/docker/pull/13039","diff_url":"https://github.com/docker/docker/pull/13039.diff","patch_url":"https://github.com/docker/docker/pull/13039.patch","issue_url":"https://api.github.com/repos/docker/docker/issues/13039","number":13039,"state":"open","locked":false,"title":"Fix check for upstart not detecting properly","user":{"login":"stevenbrichards","id":430428,"avatar_url":"https://avatars.githubusercontent.com/u/430428?v=3","gravatar_id":"","url":"https://api.github.com/users/stevenbrichards","html_url":"https://github.com/stevenbrichards","followers_url":"https://api.github.com/users/stevenbrichards/followers","following_url":"https://api.github.com/users/stevenbrichards/following{/other_user}","gists_url":"https://api.github.com/users/stevenbrichards/gists{/gist_id}","starred_url":"https://api.github.com/users/stevenbrichards/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevenbrichards/subscriptions","organizations_url":"https://api.github.com/users/stevenbrichards/orgs","repos_url":"https://api.github.com/users/stevenbrichards/repos","events_url":"https://api.github.com/users/stevenbrichards/events{/privacy}","received_events_url":"https://api.github.com/users/stevenbrichards/received_events","type":"User","site_admin":false},"body":"##### Associated Issue: \r\n\r\n#13031 \r\n\r\nThis will now properly check whether /etc/init.d/docker or service docker is\r\ninvoking the script and respond to the user accordingly. \r\n\r\nPrior to this change the script was checking for ```init_is_upstart``` outside of the action switch which doesn't work. I made the changes to reflect the [proper](https://wiki.ubuntu.com/UpstartCompatibleInitScripts) way of doing this by checking within the switch.\r\n\r\n##### Comments:\r\n\r\nLine 42 mentioned /lib/lsb/init-functions aren't available in Ubuntu 12.04, but a few [lines above](https://github.com/docker/docker/blob/ea0ccea62ee9669ce554fc9e9f5661046d86bc81/contrib/init/sysvinit-debian/docker#L36) we do ```. /lib/lsb/init-functions``` and in testing, since ```set -e``` is at the top, docker will fail anyways with:\r\n```/etc/init.d/docker: 36: .: Can't open /lib/lsb/init-functions``` when there is a typo in the command ``` sudo service docker rasdf``` \r\n\r\nI also modified line 146 because in some cases it will say the usage is ```/etc/init.d/docker```\r\n\r\nSigned-off-by: Steven Richards <steven@axiomzen.co>","created_at":"2015-05-07T00:45:00Z","updated_at":"2015-05-28T16:35:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4b39324d7b234a6ca2fee6462b2e94de63b1995e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/docker/docker/pulls/13039/commits","review_comments_url":"https://api.github.com/repos/docker/docker/pulls/13039/comments","review_comment_url":"https://api.github.com/repos/docker/docker/pulls/comments{/number}","comments_url":"https://api.github.com/repos/docker/docker/issues/13039/comments","statuses_url":"https://api.github.com/repos/docker/docker/statuses/22800d6f51ee1c16c7c1fbb787bea473fc9a6775","head":{"label":"stevenbrichards:13031-Upstart","ref":"13031-Upstart","sha":"22800d6f51ee1c16c7c1fbb787bea473fc9a6775","user":{"login":"stevenbrichards","id":430428,"avatar_url":"https://avatars.githubusercontent.com/u/430428?v=3","gravatar_id":"","url":"https://api.github.com/users/stevenbrichards","html_url":"https://github.com/stevenbrichards","followers_url":"https://api.github.com/users/stevenbrichards/followers","following_url":"https://api.github.com/users/stevenbrichards/following{/other_user}","gists_url":"https://api.github.com/users/stevenbrichards/gists{/gist_id}","starred_url":"https://api.github.com/users/stevenbrichards/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevenbrichards/subscriptions","organizations_url":"https://api.github.com/users/stevenbrichards/orgs","repos_url":"https://api.github.com/users/stevenbrichards/repos","events_url":"https://api.github.com/users/stevenbrichards/events{/privacy}","received_events_url":"https://api.github.com/users/stevenbrichards/received_events","type":"User","site_admin":false},"repo":{"id":35189887,"name":"docker","full_name":"stevenbrichards/docker","owner":{"login":"stevenbrichards","id":430428,"avatar_url":"https://avatars.githubusercontent.com/u/430428?v=3","gravatar_id":"","url":"https://api.github.com/users/stevenbrichards","html_url":"https://github.com/stevenbrichards","followers_url":"https://api.github.com/users/stevenbrichards/followers","following_url":"https://api.github.com/users/stevenbrichards/following{/other_user}","gists_url":"https://api.github.com/users/stevenbrichards/gists{/gist_id}","starred_url":"https://api.github.com/users/stevenbrichards/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevenbrichards/subscriptions","organizations_url":"https://api.github.com/users/stevenbrichards/orgs","repos_url":"https://api.github.com/users/stevenbrichards/repos","events_url":"https://api.github.com/users/stevenbrichards/events{/privacy}","received_events_url":"https://api.github.com/users/stevenbrichards/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/stevenbrichards/docker","description":"Docker - the open-source application container engine","fork":true,"url":"https://api.github.com/repos/stevenbrichards/docker","forks_url":"https://api.github.com/repos/stevenbrichards/docker/forks","keys_url":"https://api.github.com/repos/stevenbrichards/docker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/stevenbrichards/docker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/stevenbrichards/docker/teams","hooks_url":"https://api.github.com/repos/stevenbrichards/docker/hooks","issue_events_url":"https://api.github.com/repos/stevenbrichards/docker/issues/events{/number}","events_url":"https://api.github.com/repos/stevenbrichards/docker/events","assignees_url":"https://api.github.com/repos/stevenbrichards/docker/assignees{/user}","branches_url":"https://api.github.com/repos/stevenbrichards/docker/branches{/branch}","tags_url":"https://api.github.com/repos/stevenbrichards/docker/tags","blobs_url":"https://api.github.com/repos/stevenbrichards/docker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/stevenbrichards/docker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/stevenbrichards/docker/git/refs{/sha}","trees_url":"https://api.github.com/repos/stevenbrichards/docker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/stevenbrichards/docker/statuses/{sha}","languages_url":"https://api.github.com/repos/stevenbrichards/docker/languages","stargazers_url":"https://api.github.com/repos/stevenbrichards/docker/stargazers","contributors_url":"https://api.github.com/repos/stevenbrichards/docker/contributors","subscribers_url":"https://api.github.com/repos/stevenbrichards/docker/subscribers","subscription_url":"https://api.github.com/repos/stevenbrichards/docker/subscription","commits_url":"https://api.github.com/repos/stevenbrichards/docker/commits{/sha}","git_commits_url":"https://api.github.com/repos/stevenbrichards/docker/git/commits{/sha}","comments_url":"https://api.github.com/repos/stevenbrichards/docker/comments{/number}","issue_comment_url":"https://api.github.com/repos/stevenbrichards/docker/issues/comments{/number}","contents_url":"https://api.github.com/repos/stevenbrichards/docker/contents/{+path}","compare_url":"https://api.github.com/repos/stevenbrichards/docker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/stevenbrichards/docker/merges","archive_url":"https://api.github.com/repos/stevenbrichards/docker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/stevenbrichards/docker/downloads","issues_url":"https://api.github.com/repos/stevenbrichards/docker/issues{/number}","pulls_url":"https://api.github.com/repos/stevenbrichards/docker/pulls{/number}","milestones_url":"https://api.github.com/repos/stevenbrichards/docker/milestones{/number}","notifications_url":"https://api.github.com/repos/stevenbrichards/docker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/stevenbrichards/docker/labels{/name}","releases_url":"https://api.github.com/repos/stevenbrichards/docker/releases{/id}","created_at":"2015-05-07T00:25:26Z","updated_at":"2015-05-07T00:25:33Z","pushed_at":"2015-05-28T00:16:13Z","git_url":"git://github.com/stevenbrichards/docker.git","ssh_url":"git@github.com:stevenbrichards/docker.git","clone_url":"https://github.com/stevenbrichards/docker.git","svn_url":"https://github.com/stevenbrichards/docker","homepage":"http://www.docker.com","size":52451,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"c9d3681a5d0cd2d275299146855283fa89c6cdd9","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":7691631,"name":"docker","full_name":"docker/docker","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/docker","description":"Docker - the open-source application container engine","fork":false,"url":"https://api.github.com/repos/docker/docker","forks_url":"https://api.github.com/repos/docker/docker/forks","keys_url":"https://api.github.com/repos/docker/docker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/docker/docker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/docker/docker/teams","hooks_url":"https://api.github.com/repos/docker/docker/hooks","issue_events_url":"https://api.github.com/repos/docker/docker/issues/events{/number}","events_url":"https://api.github.com/repos/docker/docker/events","assignees_url":"https://api.github.com/repos/docker/docker/assignees{/user}","branches_url":"https://api.github.com/repos/docker/docker/branches{/branch}","tags_url":"https://api.github.com/repos/docker/docker/tags","blobs_url":"https://api.github.com/repos/docker/docker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/docker/docker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/docker/docker/git/refs{/sha}","trees_url":"https://api.github.com/repos/docker/docker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/docker/docker/statuses/{sha}","languages_url":"https://api.github.com/repos/docker/docker/languages","stargazers_url":"https://api.github.com/repos/docker/docker/stargazers","contributors_url":"https://api.github.com/repos/docker/docker/contributors","subscribers_url":"https://api.github.com/repos/docker/docker/subscribers","subscription_url":"https://api.github.com/repos/docker/docker/subscription","commits_url":"https://api.github.com/repos/docker/docker/commits{/sha}","git_commits_url":"https://api.github.com/repos/docker/docker/git/commits{/sha}","comments_url":"https://api.github.com/repos/docker/docker/comments{/number}","issue_comment_url":"https://api.github.com/repos/docker/docker/issues/comments{/number}","contents_url":"https://api.github.com/repos/docker/docker/contents/{+path}","compare_url":"https://api.github.com/repos/docker/docker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/docker/docker/merges","archive_url":"https://api.github.com/repos/docker/docker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/docker/docker/downloads","issues_url":"https://api.github.com/repos/docker/docker/issues{/number}","pulls_url":"https://api.github.com/repos/docker/docker/pulls{/number}","milestones_url":"https://api.github.com/repos/docker/docker/milestones{/number}","notifications_url":"https://api.github.com/repos/docker/docker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/docker/docker/labels{/name}","releases_url":"https://api.github.com/repos/docker/docker/releases{/id}","created_at":"2013-01-18T18:10:57Z","updated_at":"2015-05-28T14:53:41Z","pushed_at":"2015-05-28T16:31:57Z","git_url":"git://github.com/docker/docker.git","ssh_url":"git@github.com:docker/docker.git","clone_url":"https://github.com/docker/docker.git","svn_url":"https://github.com/docker/docker","homepage":"http://www.docker.com","size":218697,"stargazers_count":21981,"watchers_count":21981,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":5211,"mirror_url":null,"open_issues_count":1042,"forks":5211,"open_issues":1042,"watchers":21981,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/docker/docker/pulls/13039"},"html":{"href":"https://github.com/docker/docker/pull/13039"},"issue":{"href":"https://api.github.com/repos/docker/docker/issues/13039"},"comments":{"href":"https://api.github.com/repos/docker/docker/issues/13039/comments"},"review_comments":{"href":"https://api.github.com/repos/docker/docker/pulls/13039/comments"},"review_comment":{"href":"https://api.github.com/repos/docker/docker/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/docker/docker/pulls/13039/commits"},"statuses":{"href":"https://api.github.com/repos/docker/docker/statuses/22800d6f51ee1c16c7c1fbb787bea473fc9a6775"}}}}