{"action":"created","comment":{"url":"https://api.github.com/repos/crowbar/barclamp-provisioner/pulls/comments/25791094","id":25791094,"diff_hunk":"@@ -146,6 +146,29 @@ if test \"x$MD5_ADMIN\" != \"x$MD5_LOCAL\"; then\n     exit 1\n fi\n \n+# Setup groups and users\n+# # ---------------\n+\n+if [[ -z `grep '^qemu' /etc/group` ]]; then\n+  groupadd --system --gid 484 qemu\n+elif [[ -z `grep '^qemu:*.:484:*.' /etc/group` ]]; then\n+  echo \"Group qemu did not have gid 484.\"\n+  exit 1\n+fi","path":"chef/cookbooks/provisioner/templates/suse/crowbar_register.erb","position":12,"original_position":12,"commit_id":"ba40f881a09e82c767d9311f5785668fa16f1d71","original_commit_id":"ba40f881a09e82c767d9311f5785668fa16f1d71","user":{"login":"rhafer","id":373399,"avatar_url":"https://avatars.githubusercontent.com/u/373399?v=3","gravatar_id":"","url":"https://api.github.com/users/rhafer","html_url":"https://github.com/rhafer","followers_url":"https://api.github.com/users/rhafer/followers","following_url":"https://api.github.com/users/rhafer/following{/other_user}","gists_url":"https://api.github.com/users/rhafer/gists{/gist_id}","starred_url":"https://api.github.com/users/rhafer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhafer/subscriptions","organizations_url":"https://api.github.com/users/rhafer/orgs","repos_url":"https://api.github.com/users/rhafer/repos","events_url":"https://api.github.com/users/rhafer/events{/privacy}","received_events_url":"https://api.github.com/users/rhafer/received_events","type":"User","site_admin":false},"body":"Please use ```getent group qemu``` that's better than grepping through /etc/group.\r\n\r\nAnd I think something like this would be a bit more readable:\r\n\r\n```\r\ngid=$(getent group qemu | cut -f 3 -d \":\")\r\nif [ -z \"$gid\" ]; then\r\n   ...create group...\r\nelif [ \"$gid\" != \"484\" ]; then\r\n    ...error message...\r\n    exit 1\r\nfi\r\n```","created_at":"2015-03-04T16:58:48Z","updated_at":"2015-03-04T16:58:48Z","html_url":"https://github.com/crowbar/barclamp-provisioner/pull/402#discussion_r25791094","pull_request_url":"https://api.github.com/repos/crowbar/barclamp-provisioner/pulls/402","_links":{"self":{"href":"https://api.github.com/repos/crowbar/barclamp-provisioner/pulls/comments/25791094"},"html":{"href":"https://github.com/crowbar/barclamp-provisioner/pull/402#discussion_r25791094"},"pull_request":{"href":"https://api.github.com/repos/crowbar/barclamp-provisioner/pulls/402"}}},"pull_request":{"url":"https://api.github.com/repos/crowbar/barclamp-provisioner/pulls/402","id":30481083,"html_url":"https://github.com/crowbar/barclamp-provisioner/pull/402","diff_url":"https://github.com/crowbar/barclamp-provisioner/pull/402.diff","patch_url":"https://github.com/crowbar/barclamp-provisioner/pull/402.patch","issue_url":"https://api.github.com/repos/crowbar/barclamp-provisioner/issues/402","number":402,"state":"open","locked":false,"title":"Add kvm and qemu user/group with fixed id's","user":{"login":"rsalevsky","id":4128547,"avatar_url":"https://avatars.githubusercontent.com/u/4128547?v=3","gravatar_id":"","url":"https://api.github.com/users/rsalevsky","html_url":"https://github.com/rsalevsky","followers_url":"https://api.github.com/users/rsalevsky/followers","following_url":"https://api.github.com/users/rsalevsky/following{/other_user}","gists_url":"https://api.github.com/users/rsalevsky/gists{/gist_id}","starred_url":"https://api.github.com/users/rsalevsky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rsalevsky/subscriptions","organizations_url":"https://api.github.com/users/rsalevsky/orgs","repos_url":"https://api.github.com/users/rsalevsky/repos","events_url":"https://api.github.com/users/rsalevsky/events{/privacy}","received_events_url":"https://api.github.com/users/rsalevsky/received_events","type":"User","site_admin":false},"body":"Add kvm and qemu user/group with fixed uid/gid while\r\ncrowbar_register.","created_at":"2015-03-04T16:36:58Z","updated_at":"2015-03-04T16:58:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2d100ff84b834397ae1166f340a13daa5aec0be7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/crowbar/barclamp-provisioner/pulls/402/commits","review_comments_url":"https://api.github.com/repos/crowbar/barclamp-provisioner/pulls/402/comments","review_comment_url":"https://api.github.com/repos/crowbar/barclamp-provisioner/pulls/comments{/number}","comments_url":"https://api.github.com/repos/crowbar/barclamp-provisioner/issues/402/comments","statuses_url":"https://api.github.com/repos/crowbar/barclamp-provisioner/statuses/ba40f881a09e82c767d9311f5785668fa16f1d71","head":{"label":"rsalevsky:crowbar_register_users","ref":"crowbar_register_users","sha":"ba40f881a09e82c767d9311f5785668fa16f1d71","user":{"login":"rsalevsky","id":4128547,"avatar_url":"https://avatars.githubusercontent.com/u/4128547?v=3","gravatar_id":"","url":"https://api.github.com/users/rsalevsky","html_url":"https://github.com/rsalevsky","followers_url":"https://api.github.com/users/rsalevsky/followers","following_url":"https://api.github.com/users/rsalevsky/following{/other_user}","gists_url":"https://api.github.com/users/rsalevsky/gists{/gist_id}","starred_url":"https://api.github.com/users/rsalevsky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rsalevsky/subscriptions","organizations_url":"https://api.github.com/users/rsalevsky/orgs","repos_url":"https://api.github.com/users/rsalevsky/repos","events_url":"https://api.github.com/users/rsalevsky/events{/privacy}","received_events_url":"https://api.github.com/users/rsalevsky/received_events","type":"User","site_admin":false},"repo":{"id":31014904,"name":"barclamp-provisioner","full_name":"rsalevsky/barclamp-provisioner","owner":{"login":"rsalevsky","id":4128547,"avatar_url":"https://avatars.githubusercontent.com/u/4128547?v=3","gravatar_id":"","url":"https://api.github.com/users/rsalevsky","html_url":"https://github.com/rsalevsky","followers_url":"https://api.github.com/users/rsalevsky/followers","following_url":"https://api.github.com/users/rsalevsky/following{/other_user}","gists_url":"https://api.github.com/users/rsalevsky/gists{/gist_id}","starred_url":"https://api.github.com/users/rsalevsky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rsalevsky/subscriptions","organizations_url":"https://api.github.com/users/rsalevsky/orgs","repos_url":"https://api.github.com/users/rsalevsky/repos","events_url":"https://api.github.com/users/rsalevsky/events{/privacy}","received_events_url":"https://api.github.com/users/rsalevsky/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rsalevsky/barclamp-provisioner","description":"Crowbar Provisioner: Install Operating Systems","fork":true,"url":"https://api.github.com/repos/rsalevsky/barclamp-provisioner","forks_url":"https://api.github.com/repos/rsalevsky/barclamp-provisioner/forks","keys_url":"https://api.github.com/repos/rsalevsky/barclamp-provisioner/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rsalevsky/barclamp-provisioner/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rsalevsky/barclamp-provisioner/teams","hooks_url":"https://api.github.com/repos/rsalevsky/barclamp-provisioner/hooks","issue_events_url":"https://api.github.com/repos/rsalevsky/barclamp-provisioner/issues/events{/number}","events_url":"https://api.github.com/repos/rsalevsky/barclamp-provisioner/events","assignees_url":"https://api.github.com/repos/rsalevsky/barclamp-provisioner/assignees{/user}","branches_url":"https://api.github.com/repos/rsalevsky/barclamp-provisioner/branches{/branch}","tags_url":"https://api.github.com/repos/rsalevsky/barclamp-provisioner/tags","blobs_url":"https://api.github.com/repos/rsalevsky/barclamp-provisioner/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rsalevsky/barclamp-provisioner/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rsalevsky/barclamp-provisioner/git/refs{/sha}","trees_url":"https://api.github.com/repos/rsalevsky/barclamp-provisioner/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rsalevsky/barclamp-provisioner/statuses/{sha}","languages_url":"https://api.github.com/repos/rsalevsky/barclamp-provisioner/languages","stargazers_url":"https://api.github.com/repos/rsalevsky/barclamp-provisioner/stargazers","contributors_url":"https://api.github.com/repos/rsalevsky/barclamp-provisioner/contributors","subscribers_url":"https://api.github.com/repos/rsalevsky/barclamp-provisioner/subscribers","subscription_url":"https://api.github.com/repos/rsalevsky/barclamp-provisioner/subscription","commits_url":"https://api.github.com/repos/rsalevsky/barclamp-provisioner/commits{/sha}","git_commits_url":"https://api.github.com/repos/rsalevsky/barclamp-provisioner/git/commits{/sha}","comments_url":"https://api.github.com/repos/rsalevsky/barclamp-provisioner/comments{/number}","issue_comment_url":"https://api.github.com/repos/rsalevsky/barclamp-provisioner/issues/comments{/number}","contents_url":"https://api.github.com/repos/rsalevsky/barclamp-provisioner/contents/{+path}","compare_url":"https://api.github.com/repos/rsalevsky/barclamp-provisioner/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rsalevsky/barclamp-provisioner/merges","archive_url":"https://api.github.com/repos/rsalevsky/barclamp-provisioner/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rsalevsky/barclamp-provisioner/downloads","issues_url":"https://api.github.com/repos/rsalevsky/barclamp-provisioner/issues{/number}","pulls_url":"https://api.github.com/repos/rsalevsky/barclamp-provisioner/pulls{/number}","milestones_url":"https://api.github.com/repos/rsalevsky/barclamp-provisioner/milestones{/number}","notifications_url":"https://api.github.com/repos/rsalevsky/barclamp-provisioner/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rsalevsky/barclamp-provisioner/labels{/name}","releases_url":"https://api.github.com/repos/rsalevsky/barclamp-provisioner/releases{/id}","created_at":"2015-02-19T12:47:31Z","updated_at":"2015-03-04T16:35:17Z","pushed_at":"2015-03-04T16:35:35Z","git_url":"git://github.com/rsalevsky/barclamp-provisioner.git","ssh_url":"git@github.com:rsalevsky/barclamp-provisioner.git","clone_url":"https://github.com/rsalevsky/barclamp-provisioner.git","svn_url":"https://github.com/rsalevsky/barclamp-provisioner","homepage":"https://github.com/crowbar/crowbar","size":64396,"stargazers_count":0,"watchers_count":0,"language":"Ruby","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":"crowbar:master","ref":"master","sha":"37573792e672007152aba2330a504704a33055eb","user":{"login":"crowbar","id":2910205,"avatar_url":"https://avatars.githubusercontent.com/u/2910205?v=3","gravatar_id":"","url":"https://api.github.com/users/crowbar","html_url":"https://github.com/crowbar","followers_url":"https://api.github.com/users/crowbar/followers","following_url":"https://api.github.com/users/crowbar/following{/other_user}","gists_url":"https://api.github.com/users/crowbar/gists{/gist_id}","starred_url":"https://api.github.com/users/crowbar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crowbar/subscriptions","organizations_url":"https://api.github.com/users/crowbar/orgs","repos_url":"https://api.github.com/users/crowbar/repos","events_url":"https://api.github.com/users/crowbar/events{/privacy}","received_events_url":"https://api.github.com/users/crowbar/received_events","type":"Organization","site_admin":false},"repo":{"id":2351609,"name":"barclamp-provisioner","full_name":"crowbar/barclamp-provisioner","owner":{"login":"crowbar","id":2910205,"avatar_url":"https://avatars.githubusercontent.com/u/2910205?v=3","gravatar_id":"","url":"https://api.github.com/users/crowbar","html_url":"https://github.com/crowbar","followers_url":"https://api.github.com/users/crowbar/followers","following_url":"https://api.github.com/users/crowbar/following{/other_user}","gists_url":"https://api.github.com/users/crowbar/gists{/gist_id}","starred_url":"https://api.github.com/users/crowbar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crowbar/subscriptions","organizations_url":"https://api.github.com/users/crowbar/orgs","repos_url":"https://api.github.com/users/crowbar/repos","events_url":"https://api.github.com/users/crowbar/events{/privacy}","received_events_url":"https://api.github.com/users/crowbar/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/crowbar/barclamp-provisioner","description":"Crowbar Provisioner: Install Operating Systems","fork":false,"url":"https://api.github.com/repos/crowbar/barclamp-provisioner","forks_url":"https://api.github.com/repos/crowbar/barclamp-provisioner/forks","keys_url":"https://api.github.com/repos/crowbar/barclamp-provisioner/keys{/key_id}","collaborators_url":"https://api.github.com/repos/crowbar/barclamp-provisioner/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/crowbar/barclamp-provisioner/teams","hooks_url":"https://api.github.com/repos/crowbar/barclamp-provisioner/hooks","issue_events_url":"https://api.github.com/repos/crowbar/barclamp-provisioner/issues/events{/number}","events_url":"https://api.github.com/repos/crowbar/barclamp-provisioner/events","assignees_url":"https://api.github.com/repos/crowbar/barclamp-provisioner/assignees{/user}","branches_url":"https://api.github.com/repos/crowbar/barclamp-provisioner/branches{/branch}","tags_url":"https://api.github.com/repos/crowbar/barclamp-provisioner/tags","blobs_url":"https://api.github.com/repos/crowbar/barclamp-provisioner/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/crowbar/barclamp-provisioner/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/crowbar/barclamp-provisioner/git/refs{/sha}","trees_url":"https://api.github.com/repos/crowbar/barclamp-provisioner/git/trees{/sha}","statuses_url":"https://api.github.com/repos/crowbar/barclamp-provisioner/statuses/{sha}","languages_url":"https://api.github.com/repos/crowbar/barclamp-provisioner/languages","stargazers_url":"https://api.github.com/repos/crowbar/barclamp-provisioner/stargazers","contributors_url":"https://api.github.com/repos/crowbar/barclamp-provisioner/contributors","subscribers_url":"https://api.github.com/repos/crowbar/barclamp-provisioner/subscribers","subscription_url":"https://api.github.com/repos/crowbar/barclamp-provisioner/subscription","commits_url":"https://api.github.com/repos/crowbar/barclamp-provisioner/commits{/sha}","git_commits_url":"https://api.github.com/repos/crowbar/barclamp-provisioner/git/commits{/sha}","comments_url":"https://api.github.com/repos/crowbar/barclamp-provisioner/comments{/number}","issue_comment_url":"https://api.github.com/repos/crowbar/barclamp-provisioner/issues/comments{/number}","contents_url":"https://api.github.com/repos/crowbar/barclamp-provisioner/contents/{+path}","compare_url":"https://api.github.com/repos/crowbar/barclamp-provisioner/compare/{base}...{head}","merges_url":"https://api.github.com/repos/crowbar/barclamp-provisioner/merges","archive_url":"https://api.github.com/repos/crowbar/barclamp-provisioner/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/crowbar/barclamp-provisioner/downloads","issues_url":"https://api.github.com/repos/crowbar/barclamp-provisioner/issues{/number}","pulls_url":"https://api.github.com/repos/crowbar/barclamp-provisioner/pulls{/number}","milestones_url":"https://api.github.com/repos/crowbar/barclamp-provisioner/milestones{/number}","notifications_url":"https://api.github.com/repos/crowbar/barclamp-provisioner/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/crowbar/barclamp-provisioner/labels{/name}","releases_url":"https://api.github.com/repos/crowbar/barclamp-provisioner/releases{/id}","created_at":"2011-09-08T21:20:51Z","updated_at":"2015-03-04T15:38:46Z","pushed_at":"2015-03-04T15:38:46Z","git_url":"git://github.com/crowbar/barclamp-provisioner.git","ssh_url":"git@github.com:crowbar/barclamp-provisioner.git","clone_url":"https://github.com/crowbar/barclamp-provisioner.git","svn_url":"https://github.com/crowbar/barclamp-provisioner","homepage":"https://github.com/crowbar/crowbar","size":66468,"stargazers_count":60,"watchers_count":60,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":186,"mirror_url":null,"open_issues_count":11,"forks":186,"open_issues":11,"watchers":60,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/crowbar/barclamp-provisioner/pulls/402"},"html":{"href":"https://github.com/crowbar/barclamp-provisioner/pull/402"},"issue":{"href":"https://api.github.com/repos/crowbar/barclamp-provisioner/issues/402"},"comments":{"href":"https://api.github.com/repos/crowbar/barclamp-provisioner/issues/402/comments"},"review_comments":{"href":"https://api.github.com/repos/crowbar/barclamp-provisioner/pulls/402/comments"},"review_comment":{"href":"https://api.github.com/repos/crowbar/barclamp-provisioner/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/crowbar/barclamp-provisioner/pulls/402/commits"},"statuses":{"href":"https://api.github.com/repos/crowbar/barclamp-provisioner/statuses/ba40f881a09e82c767d9311f5785668fa16f1d71"}}}}