{"action":"created","comment":{"url":"https://api.github.com/repos/apache/accumulo/pulls/comments/56754529","id":56754529,"diff_hunk":"@@ -28,50 +28,52 @@ bin=\"$( cd -P \"$( dirname \"$SOURCE\" )\" && pwd )\"\n . \"$bin\"/config.sh\n unset DISPLAY\n \n-if [ ! -f $ACCUMULO_CONF_DIR/accumulo-env.sh ] ; then\n+if [[ ! -f $ACCUMULO_CONF_DIR/accumulo-env.sh ]] ; then\n    echo \"${ACCUMULO_CONF_DIR}/accumulo-env.sh does not exist. Please make sure you configure Accumulo before you run anything\"\n    echo \"We provide examples you can copy in ${ACCUMULO_HOME}/conf/examples/ which are set up for your memory footprint\"\n    exit 1\n fi\n \n-if [ -z \"$ZOOKEEPER_HOME\" ] ; then\n+if [[ -z \"$ZOOKEEPER_HOME\" ]] ; then\n    echo \"ZOOKEEPER_HOME is not set.  Please make sure it's set globally or in conf/accumulo-env.sh\"\n    exit 1\n fi\n-if [ ! -d $ZOOKEEPER_HOME ]; then\n+if [[ ! -d $ZOOKEEPER_HOME ]]; then\n    echo \"ZOOKEEPER_HOME is not a directory: $ZOOKEEPER_HOME\"\n    echo \"Please check the setting, either globally or in accumulo-env.sh.\"\n    exit 1\n fi\n \n-ZOOKEEPER_VERSION=$(find -L $ZOOKEEPER_HOME -maxdepth 1 -name \"zookeeper-[0-9]*.jar\" | head -1)\n-if [ -z \"$ZOOKEEPER_VERSION\" ]; then\n+ZOOKEEPER_VERSION=$(find -L \"$ZOOKEEPER_HOME\" -maxdepth 1 -name \"zookeeper-[0-9]*.jar\" | head -1)\n+if [[ -z \"$ZOOKEEPER_VERSION\" ]]; then\n    echo \"A Zookeeper JAR was not found in $ZOOKEEPER_HOME.\"\n    echo \"Please check ZOOKEEPER_HOME, either globally or in accumulo-env.sh.\"\n    exit 1\n fi\n-ZOOKEEPER_VERSION=${ZOOKEEPER_VERSION##$ZOOKEEPER_HOME/zookeeper-}\n-ZOOKEEPER_VERSION=${ZOOKEEPER_VERSION%%.jar}\n+ZOOKEEPER_VERSION=$(basename \"${ZOOKEEPER_VERSION##*-}\" .jar)\n \n-if [ \"$ZOOKEEPER_VERSION\" '<' \"3.3.0\" ]; then\n+if [[ \"$ZOOKEEPER_VERSION\" < \"3.3.0\" ]]; then\n    echo \"WARN : Using Zookeeper $ZOOKEEPER_VERSION.  Use version 3.3.0 or greater to avoid zookeeper deadlock bug.\";\n fi\n \n-${bin}/start-server.sh $MONITOR monitor \n+\"${bin}/start-server.sh\" \"$MONITOR\" monitor\n \n-if [ \"$1\" != \"--notSlaves\" ]; then\n-   ${bin}/tup.sh\n+if [[ \"$1\" != \"--notSlaves\" ]]; then\n+   \"${bin}/tup.sh\"\n fi\n \n-${bin}/accumulo org.apache.accumulo.master.state.SetGoalState NORMAL\n-for master in `egrep -v '(^#|^\\s*$)' \"$ACCUMULO_CONF_DIR/masters\"`; do\n-   ${bin}/start-server.sh $master master\n-done\n+\"${bin}/accumulo\" org.apache.accumulo.master.state.SetGoalState NORMAL\n \n-for gc in `egrep -v '(^#|^\\s*$)' \"$ACCUMULO_CONF_DIR/gc\"`; do\n-   ${bin}/start-server.sh $gc gc \"garbage collector\"\n-done\n+startServersFromHostsFile() {\n+  # use hostfile in conf dir to get hosts, and start each server with the remaining args\n+  local hostfile; hostfile=\"$1\"\n+  shift\n+  local otherArgs; otherArgs=(\"$@\")\n+  while IFS=$' \\t\\n' read -r host; do\n+    \"${bin}/start-server.sh\" \"$host\" \"${otherArgs[@]}\"\n+  done < <(egrep -v '^(\\s*#.*|\\s*)$' \"$ACCUMULO_CONF_DIR/$hostfile\")","path":"assemble/bin/start-all.sh","position":74,"original_position":74,"commit_id":"0e5657945de3494f6790284f13044bff5db4aa57","original_commit_id":"0e5657945de3494f6790284f13044bff5db4aa57","user":{"login":"joshelser","id":67863,"avatar_url":"https://avatars.githubusercontent.com/u/67863?v=3","gravatar_id":"","url":"https://api.github.com/users/joshelser","html_url":"https://github.com/joshelser","followers_url":"https://api.github.com/users/joshelser/followers","following_url":"https://api.github.com/users/joshelser/following{/other_user}","gists_url":"https://api.github.com/users/joshelser/gists{/gist_id}","starred_url":"https://api.github.com/users/joshelser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshelser/subscriptions","organizations_url":"https://api.github.com/users/joshelser/orgs","repos_url":"https://api.github.com/users/joshelser/repos","events_url":"https://api.github.com/users/joshelser/events{/privacy}","received_events_url":"https://api.github.com/users/joshelser/received_events","type":"User","site_admin":false},"body":"The egrep pattern is slightly different here. Any chance for a comment? :)","created_at":"2016-03-19T20:21:36Z","updated_at":"2016-03-19T20:21:36Z","html_url":"https://github.com/apache/accumulo/pull/81#discussion_r56754529","pull_request_url":"https://api.github.com/repos/apache/accumulo/pulls/81","_links":{"self":{"href":"https://api.github.com/repos/apache/accumulo/pulls/comments/56754529"},"html":{"href":"https://github.com/apache/accumulo/pull/81#discussion_r56754529"},"pull_request":{"href":"https://api.github.com/repos/apache/accumulo/pulls/81"}}},"pull_request":{"url":"https://api.github.com/repos/apache/accumulo/pulls/81","id":63171137,"html_url":"https://github.com/apache/accumulo/pull/81","diff_url":"https://github.com/apache/accumulo/pull/81.diff","patch_url":"https://github.com/apache/accumulo/pull/81.patch","issue_url":"https://api.github.com/repos/apache/accumulo/issues/81","number":81,"state":"open","locked":false,"title":"ACCUMULO-4162 Fix zookeeper version matching","user":{"login":"ctubbsii","id":1280725,"avatar_url":"https://avatars.githubusercontent.com/u/1280725?v=3","gravatar_id":"","url":"https://api.github.com/users/ctubbsii","html_url":"https://github.com/ctubbsii","followers_url":"https://api.github.com/users/ctubbsii/followers","following_url":"https://api.github.com/users/ctubbsii/following{/other_user}","gists_url":"https://api.github.com/users/ctubbsii/gists{/gist_id}","starred_url":"https://api.github.com/users/ctubbsii/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ctubbsii/subscriptions","organizations_url":"https://api.github.com/users/ctubbsii/orgs","repos_url":"https://api.github.com/users/ctubbsii/repos","events_url":"https://api.github.com/users/ctubbsii/events{/privacy}","received_events_url":"https://api.github.com/users/ctubbsii/received_events","type":"User","site_admin":false},"body":"In the course of fixing ACCUMULO-4162, I noticed lots of other small script problems which were just as likely to mess up users. So, I ran shellcheck on all the scripts in assemble/bin, and a little bit outside there. This is the results for the 1.6 branch, and could use a bit of a review/manual testing to make sure they work as expected.\r\n\r\nAny help checking these out would be greatly appreciated.","created_at":"2016-03-17T04:11:36Z","updated_at":"2016-03-19T20:21:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e9b64896356200bb786cc8153792a9cb3d1026ed","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/apache/accumulo/pulls/81/commits","review_comments_url":"https://api.github.com/repos/apache/accumulo/pulls/81/comments","review_comment_url":"https://api.github.com/repos/apache/accumulo/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/accumulo/issues/81/comments","statuses_url":"https://api.github.com/repos/apache/accumulo/statuses/0e5657945de3494f6790284f13044bff5db4aa57","head":{"label":"ctubbsii:shellcheck-pedantry","ref":"shellcheck-pedantry","sha":"0e5657945de3494f6790284f13044bff5db4aa57","user":{"login":"ctubbsii","id":1280725,"avatar_url":"https://avatars.githubusercontent.com/u/1280725?v=3","gravatar_id":"","url":"https://api.github.com/users/ctubbsii","html_url":"https://github.com/ctubbsii","followers_url":"https://api.github.com/users/ctubbsii/followers","following_url":"https://api.github.com/users/ctubbsii/following{/other_user}","gists_url":"https://api.github.com/users/ctubbsii/gists{/gist_id}","starred_url":"https://api.github.com/users/ctubbsii/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ctubbsii/subscriptions","organizations_url":"https://api.github.com/users/ctubbsii/orgs","repos_url":"https://api.github.com/users/ctubbsii/repos","events_url":"https://api.github.com/users/ctubbsii/events{/privacy}","received_events_url":"https://api.github.com/users/ctubbsii/received_events","type":"User","site_admin":false},"repo":{"id":9703694,"name":"accumulo","full_name":"ctubbsii/accumulo","owner":{"login":"ctubbsii","id":1280725,"avatar_url":"https://avatars.githubusercontent.com/u/1280725?v=3","gravatar_id":"","url":"https://api.github.com/users/ctubbsii","html_url":"https://github.com/ctubbsii","followers_url":"https://api.github.com/users/ctubbsii/followers","following_url":"https://api.github.com/users/ctubbsii/following{/other_user}","gists_url":"https://api.github.com/users/ctubbsii/gists{/gist_id}","starred_url":"https://api.github.com/users/ctubbsii/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ctubbsii/subscriptions","organizations_url":"https://api.github.com/users/ctubbsii/orgs","repos_url":"https://api.github.com/users/ctubbsii/repos","events_url":"https://api.github.com/users/ctubbsii/events{/privacy}","received_events_url":"https://api.github.com/users/ctubbsii/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ctubbsii/accumulo","description":"Mirror of Apache Accumulo","fork":true,"url":"https://api.github.com/repos/ctubbsii/accumulo","forks_url":"https://api.github.com/repos/ctubbsii/accumulo/forks","keys_url":"https://api.github.com/repos/ctubbsii/accumulo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ctubbsii/accumulo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ctubbsii/accumulo/teams","hooks_url":"https://api.github.com/repos/ctubbsii/accumulo/hooks","issue_events_url":"https://api.github.com/repos/ctubbsii/accumulo/issues/events{/number}","events_url":"https://api.github.com/repos/ctubbsii/accumulo/events","assignees_url":"https://api.github.com/repos/ctubbsii/accumulo/assignees{/user}","branches_url":"https://api.github.com/repos/ctubbsii/accumulo/branches{/branch}","tags_url":"https://api.github.com/repos/ctubbsii/accumulo/tags","blobs_url":"https://api.github.com/repos/ctubbsii/accumulo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ctubbsii/accumulo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ctubbsii/accumulo/git/refs{/sha}","trees_url":"https://api.github.com/repos/ctubbsii/accumulo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ctubbsii/accumulo/statuses/{sha}","languages_url":"https://api.github.com/repos/ctubbsii/accumulo/languages","stargazers_url":"https://api.github.com/repos/ctubbsii/accumulo/stargazers","contributors_url":"https://api.github.com/repos/ctubbsii/accumulo/contributors","subscribers_url":"https://api.github.com/repos/ctubbsii/accumulo/subscribers","subscription_url":"https://api.github.com/repos/ctubbsii/accumulo/subscription","commits_url":"https://api.github.com/repos/ctubbsii/accumulo/commits{/sha}","git_commits_url":"https://api.github.com/repos/ctubbsii/accumulo/git/commits{/sha}","comments_url":"https://api.github.com/repos/ctubbsii/accumulo/comments{/number}","issue_comment_url":"https://api.github.com/repos/ctubbsii/accumulo/issues/comments{/number}","contents_url":"https://api.github.com/repos/ctubbsii/accumulo/contents/{+path}","compare_url":"https://api.github.com/repos/ctubbsii/accumulo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ctubbsii/accumulo/merges","archive_url":"https://api.github.com/repos/ctubbsii/accumulo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ctubbsii/accumulo/downloads","issues_url":"https://api.github.com/repos/ctubbsii/accumulo/issues{/number}","pulls_url":"https://api.github.com/repos/ctubbsii/accumulo/pulls{/number}","milestones_url":"https://api.github.com/repos/ctubbsii/accumulo/milestones{/number}","notifications_url":"https://api.github.com/repos/ctubbsii/accumulo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ctubbsii/accumulo/labels{/name}","releases_url":"https://api.github.com/repos/ctubbsii/accumulo/releases{/id}","deployments_url":"https://api.github.com/repos/ctubbsii/accumulo/deployments","created_at":"2013-04-26T20:31:50Z","updated_at":"2015-05-08T00:03:21Z","pushed_at":"2016-03-17T04:07:25Z","git_url":"git://github.com/ctubbsii/accumulo.git","ssh_url":"git@github.com:ctubbsii/accumulo.git","clone_url":"https://github.com/ctubbsii/accumulo.git","svn_url":"https://github.com/ctubbsii/accumulo","homepage":"http://accumulo.apache.org","size":48267,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"apache:1.6","ref":"1.6","sha":"ecfd95ce36161a7558a89cd284fc16d8e9110771","user":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":2524488,"name":"accumulo","full_name":"apache/accumulo","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/accumulo","description":"Mirror of Apache Accumulo","fork":false,"url":"https://api.github.com/repos/apache/accumulo","forks_url":"https://api.github.com/repos/apache/accumulo/forks","keys_url":"https://api.github.com/repos/apache/accumulo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/accumulo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/accumulo/teams","hooks_url":"https://api.github.com/repos/apache/accumulo/hooks","issue_events_url":"https://api.github.com/repos/apache/accumulo/issues/events{/number}","events_url":"https://api.github.com/repos/apache/accumulo/events","assignees_url":"https://api.github.com/repos/apache/accumulo/assignees{/user}","branches_url":"https://api.github.com/repos/apache/accumulo/branches{/branch}","tags_url":"https://api.github.com/repos/apache/accumulo/tags","blobs_url":"https://api.github.com/repos/apache/accumulo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/accumulo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/accumulo/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/accumulo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/accumulo/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/accumulo/languages","stargazers_url":"https://api.github.com/repos/apache/accumulo/stargazers","contributors_url":"https://api.github.com/repos/apache/accumulo/contributors","subscribers_url":"https://api.github.com/repos/apache/accumulo/subscribers","subscription_url":"https://api.github.com/repos/apache/accumulo/subscription","commits_url":"https://api.github.com/repos/apache/accumulo/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/accumulo/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/accumulo/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/accumulo/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/accumulo/contents/{+path}","compare_url":"https://api.github.com/repos/apache/accumulo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/accumulo/merges","archive_url":"https://api.github.com/repos/apache/accumulo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/accumulo/downloads","issues_url":"https://api.github.com/repos/apache/accumulo/issues{/number}","pulls_url":"https://api.github.com/repos/apache/accumulo/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/accumulo/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/accumulo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/accumulo/labels{/name}","releases_url":"https://api.github.com/repos/apache/accumulo/releases{/id}","deployments_url":"https://api.github.com/repos/apache/accumulo/deployments","created_at":"2011-10-06T07:00:09Z","updated_at":"2016-03-16T05:26:28Z","pushed_at":"2016-03-17T04:11:36Z","git_url":"git://github.com/apache/accumulo.git","ssh_url":"git@github.com:apache/accumulo.git","clone_url":"https://github.com/apache/accumulo.git","svn_url":"https://github.com/apache/accumulo","homepage":"","size":63523,"stargazers_count":210,"watchers_count":210,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":115,"mirror_url":"git://git.apache.org/accumulo.git","open_issues_count":5,"forks":115,"open_issues":5,"watchers":210,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/accumulo/pulls/81"},"html":{"href":"https://github.com/apache/accumulo/pull/81"},"issue":{"href":"https://api.github.com/repos/apache/accumulo/issues/81"},"comments":{"href":"https://api.github.com/repos/apache/accumulo/issues/81/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/accumulo/pulls/81/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/accumulo/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/accumulo/pulls/81/commits"},"statuses":{"href":"https://api.github.com/repos/apache/accumulo/statuses/0e5657945de3494f6790284f13044bff5db4aa57"}}}}