{"action":"created","comment":{"url":"https://api.github.com/repos/coreos/toolbox/pulls/comments/84716117","pull_request_review_id":5476112,"id":84716117,"diff_hunk":"@@ -23,24 +20,42 @@ if [ -f \"${toolboxrc}\" ]; then\n \tsource \"${toolboxrc}\"\n fi\n \n-machinename=$(echo \"${USER}-${TOOLBOX_DOCKER_IMAGE}-${TOOLBOX_DOCKER_TAG}\" | sed -r 's/[^a-zA-Z0-9_.-]/_/g')\n-machinepath=\"${TOOLBOX_DIRECTORY}/${machinename}\"\n-osrelease=\"${machinepath}/etc/os-release\"\n-if [ ! -f ${osrelease} ] || systemctl is-failed -q ${machinename} ; then\n-\tsudo mkdir -p \"${machinepath}\"\n-\tsudo chown ${USER}: \"${machinepath}\"\n-\n-\tdocker pull \"${TOOLBOX_DOCKER_IMAGE}:${TOOLBOX_DOCKER_TAG}\"\n-\tdocker create --name=${machinename} \"${TOOLBOX_DOCKER_IMAGE}:${TOOLBOX_DOCKER_TAG}\" /bin/true\n-\tdocker export ${machinename} | sudo tar -x -C \"${machinepath}\" -f -\n-\tdocker rm ${machinename}\n-\tsudo touch ${osrelease}\n-fi\n-\n-sudo systemd-nspawn \\\n-\t--directory=\"${machinepath}\" \\\n-\t--capability=all \\\n-\t--share-system \\\n-        ${TOOLBOX_BIND} \\\n-        ${TOOLBOX_ENV} \\\n-\t--user=\"${TOOLBOX_USER}\" \"$@\"\n+# Provide a compatibility layer that interprets command-line arguments\n+# to this script as both rkt options and the command to be run inside\n+# the container.  The first argument that does not start with a dash is\n+# understood to be the program run in the container, and all following\n+# arguments are passed to that program.  An exception is when the rkt\n+# option --exec= is given first, in which case all arguments are passed\n+# to rkt unchanged.\n+user_args=(--exec=/usr/bin/bash)\n+while [ $# -ge 1 ]; do\n+\tif [ -n \"${user_args[0]}\" -a \"x${1#-}\" = \"x$1\" ]; then\n+\t\tuser_args+=(--exec=\"$1\")\n+\t\tshift\n+\t\t[ $# -gt 0 ] && user_args+=(-- \"$@\")\n+\t\tunset user_args[0]\n+\t\tbreak\n+\tfi\n+\t[ \"x${1#--exec=}\" = \"x$1\" ] || unset user_args[0]\n+\tuser_args+=(\"$1\")\n+\tshift\n+done\n+\n+exec sudo rkt --insecure-options=image run \\\n+    --interactive \\\n+    --mount=volume=hosts,target=/etc/hosts \\","path":"toolbox","position":61,"original_position":61,"commit_id":"056090affd29de496c202a1abe705f0c284bd968","original_commit_id":"056090affd29de496c202a1abe705f0c284bd968","user":{"login":"squeed","id":551378,"avatar_url":"https://avatars.githubusercontent.com/u/551378?v=3","gravatar_id":"","url":"https://api.github.com/users/squeed","html_url":"https://github.com/squeed","followers_url":"https://api.github.com/users/squeed/followers","following_url":"https://api.github.com/users/squeed/following{/other_user}","gists_url":"https://api.github.com/users/squeed/gists{/gist_id}","starred_url":"https://api.github.com/users/squeed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/squeed/subscriptions","organizations_url":"https://api.github.com/users/squeed/orgs","repos_url":"https://api.github.com/users/squeed/repos","events_url":"https://api.github.com/users/squeed/events{/privacy}","received_events_url":"https://api.github.com/users/squeed/received_events","type":"User","site_admin":false},"body":"If you don't want the toobox to be able to edit /etc/hosts and /etc/resolv.conf, you can just run `rkt --hosts-entry=host --dns=host`","created_at":"2016-10-24T15:39:11Z","updated_at":"2016-10-24T15:39:11Z","html_url":"https://github.com/coreos/toolbox/pull/34#discussion_r84716117","pull_request_url":"https://api.github.com/repos/coreos/toolbox/pulls/34","_links":{"self":{"href":"https://api.github.com/repos/coreos/toolbox/pulls/comments/84716117"},"html":{"href":"https://github.com/coreos/toolbox/pull/34#discussion_r84716117"},"pull_request":{"href":"https://api.github.com/repos/coreos/toolbox/pulls/34"}}},"pull_request":{"url":"https://api.github.com/repos/coreos/toolbox/pulls/34","id":90463203,"html_url":"https://github.com/coreos/toolbox/pull/34","diff_url":"https://github.com/coreos/toolbox/pull/34.diff","patch_url":"https://github.com/coreos/toolbox/pull/34.patch","issue_url":"https://api.github.com/repos/coreos/toolbox/issues/34","number":34,"state":"open","locked":false,"title":"Switch to rkt","user":{"login":"dm0-","id":1379865,"avatar_url":"https://avatars.githubusercontent.com/u/1379865?v=3","gravatar_id":"","url":"https://api.github.com/users/dm0-","html_url":"https://github.com/dm0-","followers_url":"https://api.github.com/users/dm0-/followers","following_url":"https://api.github.com/users/dm0-/following{/other_user}","gists_url":"https://api.github.com/users/dm0-/gists{/gist_id}","starred_url":"https://api.github.com/users/dm0-/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dm0-/subscriptions","organizations_url":"https://api.github.com/users/dm0-/orgs","repos_url":"https://api.github.com/users/dm0-/repos","events_url":"https://api.github.com/users/dm0-/events{/privacy}","received_events_url":"https://api.github.com/users/dm0-/received_events","type":"User","site_admin":false},"body":"This fixes coreos/bugs#1610.","created_at":"2016-10-22T00:32:22Z","updated_at":"2016-10-24T15:39:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"12aebabd35752b4e93af6dc3ab15e4e9b9025745","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/coreos/toolbox/pulls/34/commits","review_comments_url":"https://api.github.com/repos/coreos/toolbox/pulls/34/comments","review_comment_url":"https://api.github.com/repos/coreos/toolbox/pulls/comments{/number}","comments_url":"https://api.github.com/repos/coreos/toolbox/issues/34/comments","statuses_url":"https://api.github.com/repos/coreos/toolbox/statuses/056090affd29de496c202a1abe705f0c284bd968","head":{"label":"dm0-:bugs-1610","ref":"bugs-1610","sha":"056090affd29de496c202a1abe705f0c284bd968","user":{"login":"dm0-","id":1379865,"avatar_url":"https://avatars.githubusercontent.com/u/1379865?v=3","gravatar_id":"","url":"https://api.github.com/users/dm0-","html_url":"https://github.com/dm0-","followers_url":"https://api.github.com/users/dm0-/followers","following_url":"https://api.github.com/users/dm0-/following{/other_user}","gists_url":"https://api.github.com/users/dm0-/gists{/gist_id}","starred_url":"https://api.github.com/users/dm0-/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dm0-/subscriptions","organizations_url":"https://api.github.com/users/dm0-/orgs","repos_url":"https://api.github.com/users/dm0-/repos","events_url":"https://api.github.com/users/dm0-/events{/privacy}","received_events_url":"https://api.github.com/users/dm0-/received_events","type":"User","site_admin":false},"repo":{"id":71598604,"name":"toolbox","full_name":"dm0-/toolbox","owner":{"login":"dm0-","id":1379865,"avatar_url":"https://avatars.githubusercontent.com/u/1379865?v=3","gravatar_id":"","url":"https://api.github.com/users/dm0-","html_url":"https://github.com/dm0-","followers_url":"https://api.github.com/users/dm0-/followers","following_url":"https://api.github.com/users/dm0-/following{/other_user}","gists_url":"https://api.github.com/users/dm0-/gists{/gist_id}","starred_url":"https://api.github.com/users/dm0-/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dm0-/subscriptions","organizations_url":"https://api.github.com/users/dm0-/orgs","repos_url":"https://api.github.com/users/dm0-/repos","events_url":"https://api.github.com/users/dm0-/events{/privacy}","received_events_url":"https://api.github.com/users/dm0-/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dm0-/toolbox","description":"bring your tools with you","fork":true,"url":"https://api.github.com/repos/dm0-/toolbox","forks_url":"https://api.github.com/repos/dm0-/toolbox/forks","keys_url":"https://api.github.com/repos/dm0-/toolbox/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dm0-/toolbox/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dm0-/toolbox/teams","hooks_url":"https://api.github.com/repos/dm0-/toolbox/hooks","issue_events_url":"https://api.github.com/repos/dm0-/toolbox/issues/events{/number}","events_url":"https://api.github.com/repos/dm0-/toolbox/events","assignees_url":"https://api.github.com/repos/dm0-/toolbox/assignees{/user}","branches_url":"https://api.github.com/repos/dm0-/toolbox/branches{/branch}","tags_url":"https://api.github.com/repos/dm0-/toolbox/tags","blobs_url":"https://api.github.com/repos/dm0-/toolbox/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dm0-/toolbox/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dm0-/toolbox/git/refs{/sha}","trees_url":"https://api.github.com/repos/dm0-/toolbox/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dm0-/toolbox/statuses/{sha}","languages_url":"https://api.github.com/repos/dm0-/toolbox/languages","stargazers_url":"https://api.github.com/repos/dm0-/toolbox/stargazers","contributors_url":"https://api.github.com/repos/dm0-/toolbox/contributors","subscribers_url":"https://api.github.com/repos/dm0-/toolbox/subscribers","subscription_url":"https://api.github.com/repos/dm0-/toolbox/subscription","commits_url":"https://api.github.com/repos/dm0-/toolbox/commits{/sha}","git_commits_url":"https://api.github.com/repos/dm0-/toolbox/git/commits{/sha}","comments_url":"https://api.github.com/repos/dm0-/toolbox/comments{/number}","issue_comment_url":"https://api.github.com/repos/dm0-/toolbox/issues/comments{/number}","contents_url":"https://api.github.com/repos/dm0-/toolbox/contents/{+path}","compare_url":"https://api.github.com/repos/dm0-/toolbox/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dm0-/toolbox/merges","archive_url":"https://api.github.com/repos/dm0-/toolbox/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dm0-/toolbox/downloads","issues_url":"https://api.github.com/repos/dm0-/toolbox/issues{/number}","pulls_url":"https://api.github.com/repos/dm0-/toolbox/pulls{/number}","milestones_url":"https://api.github.com/repos/dm0-/toolbox/milestones{/number}","notifications_url":"https://api.github.com/repos/dm0-/toolbox/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dm0-/toolbox/labels{/name}","releases_url":"https://api.github.com/repos/dm0-/toolbox/releases{/id}","deployments_url":"https://api.github.com/repos/dm0-/toolbox/deployments","created_at":"2016-10-21T21:35:17Z","updated_at":"2016-10-21T21:35:18Z","pushed_at":"2016-10-22T00:32:05Z","git_url":"git://github.com/dm0-/toolbox.git","ssh_url":"git@github.com:dm0-/toolbox.git","clone_url":"https://github.com/dm0-/toolbox.git","svn_url":"https://github.com/dm0-/toolbox","homepage":"","size":24,"stargazers_count":0,"watchers_count":0,"language":"Shell","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":"coreos:master","ref":"master","sha":"a2767a0013c409a2381f7cdd4e31000b5fcded7e","user":{"login":"coreos","id":3730757,"avatar_url":"https://avatars.githubusercontent.com/u/3730757?v=3","gravatar_id":"","url":"https://api.github.com/users/coreos","html_url":"https://github.com/coreos","followers_url":"https://api.github.com/users/coreos/followers","following_url":"https://api.github.com/users/coreos/following{/other_user}","gists_url":"https://api.github.com/users/coreos/gists{/gist_id}","starred_url":"https://api.github.com/users/coreos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coreos/subscriptions","organizations_url":"https://api.github.com/users/coreos/orgs","repos_url":"https://api.github.com/users/coreos/repos","events_url":"https://api.github.com/users/coreos/events{/privacy}","received_events_url":"https://api.github.com/users/coreos/received_events","type":"Organization","site_admin":false},"repo":{"id":18648432,"name":"toolbox","full_name":"coreos/toolbox","owner":{"login":"coreos","id":3730757,"avatar_url":"https://avatars.githubusercontent.com/u/3730757?v=3","gravatar_id":"","url":"https://api.github.com/users/coreos","html_url":"https://github.com/coreos","followers_url":"https://api.github.com/users/coreos/followers","following_url":"https://api.github.com/users/coreos/following{/other_user}","gists_url":"https://api.github.com/users/coreos/gists{/gist_id}","starred_url":"https://api.github.com/users/coreos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coreos/subscriptions","organizations_url":"https://api.github.com/users/coreos/orgs","repos_url":"https://api.github.com/users/coreos/repos","events_url":"https://api.github.com/users/coreos/events{/privacy}","received_events_url":"https://api.github.com/users/coreos/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/coreos/toolbox","description":"bring your tools with you","fork":false,"url":"https://api.github.com/repos/coreos/toolbox","forks_url":"https://api.github.com/repos/coreos/toolbox/forks","keys_url":"https://api.github.com/repos/coreos/toolbox/keys{/key_id}","collaborators_url":"https://api.github.com/repos/coreos/toolbox/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/coreos/toolbox/teams","hooks_url":"https://api.github.com/repos/coreos/toolbox/hooks","issue_events_url":"https://api.github.com/repos/coreos/toolbox/issues/events{/number}","events_url":"https://api.github.com/repos/coreos/toolbox/events","assignees_url":"https://api.github.com/repos/coreos/toolbox/assignees{/user}","branches_url":"https://api.github.com/repos/coreos/toolbox/branches{/branch}","tags_url":"https://api.github.com/repos/coreos/toolbox/tags","blobs_url":"https://api.github.com/repos/coreos/toolbox/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/coreos/toolbox/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/coreos/toolbox/git/refs{/sha}","trees_url":"https://api.github.com/repos/coreos/toolbox/git/trees{/sha}","statuses_url":"https://api.github.com/repos/coreos/toolbox/statuses/{sha}","languages_url":"https://api.github.com/repos/coreos/toolbox/languages","stargazers_url":"https://api.github.com/repos/coreos/toolbox/stargazers","contributors_url":"https://api.github.com/repos/coreos/toolbox/contributors","subscribers_url":"https://api.github.com/repos/coreos/toolbox/subscribers","subscription_url":"https://api.github.com/repos/coreos/toolbox/subscription","commits_url":"https://api.github.com/repos/coreos/toolbox/commits{/sha}","git_commits_url":"https://api.github.com/repos/coreos/toolbox/git/commits{/sha}","comments_url":"https://api.github.com/repos/coreos/toolbox/comments{/number}","issue_comment_url":"https://api.github.com/repos/coreos/toolbox/issues/comments{/number}","contents_url":"https://api.github.com/repos/coreos/toolbox/contents/{+path}","compare_url":"https://api.github.com/repos/coreos/toolbox/compare/{base}...{head}","merges_url":"https://api.github.com/repos/coreos/toolbox/merges","archive_url":"https://api.github.com/repos/coreos/toolbox/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/coreos/toolbox/downloads","issues_url":"https://api.github.com/repos/coreos/toolbox/issues{/number}","pulls_url":"https://api.github.com/repos/coreos/toolbox/pulls{/number}","milestones_url":"https://api.github.com/repos/coreos/toolbox/milestones{/number}","notifications_url":"https://api.github.com/repos/coreos/toolbox/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/coreos/toolbox/labels{/name}","releases_url":"https://api.github.com/repos/coreos/toolbox/releases{/id}","deployments_url":"https://api.github.com/repos/coreos/toolbox/deployments","created_at":"2014-04-10T19:12:30Z","updated_at":"2016-10-16T08:59:18Z","pushed_at":"2016-10-22T00:32:22Z","git_url":"git://github.com/coreos/toolbox.git","ssh_url":"git@github.com:coreos/toolbox.git","clone_url":"https://github.com/coreos/toolbox.git","svn_url":"https://github.com/coreos/toolbox","homepage":"","size":42,"stargazers_count":168,"watchers_count":168,"language":"Shell","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":39,"mirror_url":null,"open_issues_count":12,"forks":39,"open_issues":12,"watchers":168,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/coreos/toolbox/pulls/34"},"html":{"href":"https://github.com/coreos/toolbox/pull/34"},"issue":{"href":"https://api.github.com/repos/coreos/toolbox/issues/34"},"comments":{"href":"https://api.github.com/repos/coreos/toolbox/issues/34/comments"},"review_comments":{"href":"https://api.github.com/repos/coreos/toolbox/pulls/34/comments"},"review_comment":{"href":"https://api.github.com/repos/coreos/toolbox/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/coreos/toolbox/pulls/34/commits"},"statuses":{"href":"https://api.github.com/repos/coreos/toolbox/statuses/056090affd29de496c202a1abe705f0c284bd968"}}}}
{"actor":{"display_login":"squeed"}}