{"action":"created","comment":{"url":"https://api.github.com/repos/dnschneid/crouton/pulls/comments/48578427","id":48578427,"diff_hunk":"@@ -239,3 +239,60 @@ websocketcommand() {\n         echo \"EError timeout\"\n     fi\n }\n+\n+# Check space requirements on CHROOTS partition\n+# $1: the partition's minimum size threshold\n+# $2: the partition's minimum available space threshold\n+check_space() {\n+    local part=${CHROOTS:-/usr/local}\n+    df -m $part | awk 'FNR == 2 {print $2,$4,$6}' |\\\n+    while read -r size avail mp; do\n+        if [ \"$size\" -lt \"$1\" ]; then\n+            local size_gb=\"$((${size}/1000))GB\"\n+            echo \"WARNING: Your CHROOTS partition is rather small (${size_gb}).\"\n+            echo \"WARNING: Usually $((${1}/1000))GB or more is needed. \"\n+        #   error 1 \"ERROR: Choose another partition then try again...\"\n+            return 1\n+        elif [ \"$avail\" -lt \"$2\" ]; then\n+            local avail_gb=\"$((${avail}/1000))GB\"\n+            echo \"WARNING: Your available space for CHROOTS is rather small (${avail_gb}).\"\n+            echo \"WARNING: Usually $((${2}/1000))GB or more is needed. \"\n+        #   error 1 \"ERROR: Free up more space then try again...\"\n+            return 2\n+        else\n+        #   echo \"Your space requirements for CHROOTS have been met.\"\n+            return 0\n+        fi\n+    done\n+}\n+\n+# Check if partition 7 / ROOT-C (ChrUbuntu) has been resized\n+# normally called when space requirements on the CHROOTS partiton aren't met\n+check_chrubuntu() {\n+    local disk=$(rootdev -s -d)","path":"installer/functions","position":34,"original_position":34,"commit_id":"152e56c2611979d0401105c97dc03703a51eff35","original_commit_id":"152e56c2611979d0401105c97dc03703a51eff35","user":{"login":"dnschneid","id":522200,"avatar_url":"https://avatars.githubusercontent.com/u/522200?v=3","gravatar_id":"","url":"https://api.github.com/users/dnschneid","html_url":"https://github.com/dnschneid","followers_url":"https://api.github.com/users/dnschneid/followers","following_url":"https://api.github.com/users/dnschneid/following{/other_user}","gists_url":"https://api.github.com/users/dnschneid/gists{/gist_id}","starred_url":"https://api.github.com/users/dnschneid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dnschneid/subscriptions","organizations_url":"https://api.github.com/users/dnschneid/orgs","repos_url":"https://api.github.com/users/dnschneid/repos","events_url":"https://api.github.com/users/dnschneid/events{/privacy}","received_events_url":"https://api.github.com/users/dnschneid/received_events","type":"User","site_admin":false},"body":"quoting (also lines below)","created_at":"2015-12-29T23:36:56Z","updated_at":"2015-12-29T23:36:56Z","html_url":"https://github.com/dnschneid/crouton/pull/2240#discussion_r48578427","pull_request_url":"https://api.github.com/repos/dnschneid/crouton/pulls/2240","_links":{"self":{"href":"https://api.github.com/repos/dnschneid/crouton/pulls/comments/48578427"},"html":{"href":"https://github.com/dnschneid/crouton/pull/2240#discussion_r48578427"},"pull_request":{"href":"https://api.github.com/repos/dnschneid/crouton/pulls/2240"}}},"pull_request":{"url":"https://api.github.com/repos/dnschneid/crouton/pulls/2240","id":50755232,"html_url":"https://github.com/dnschneid/crouton/pull/2240","diff_url":"https://github.com/dnschneid/crouton/pull/2240.diff","patch_url":"https://github.com/dnschneid/crouton/pull/2240.patch","issue_url":"https://api.github.com/repos/dnschneid/crouton/issues/2240","number":2240,"state":"open","locked":false,"title":"Size tests","user":{"login":"DennisLfromGA","id":3418772,"avatar_url":"https://avatars.githubusercontent.com/u/3418772?v=3","gravatar_id":"","url":"https://api.github.com/users/DennisLfromGA","html_url":"https://github.com/DennisLfromGA","followers_url":"https://api.github.com/users/DennisLfromGA/followers","following_url":"https://api.github.com/users/DennisLfromGA/following{/other_user}","gists_url":"https://api.github.com/users/DennisLfromGA/gists{/gist_id}","starred_url":"https://api.github.com/users/DennisLfromGA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DennisLfromGA/subscriptions","organizations_url":"https://api.github.com/users/DennisLfromGA/orgs","repos_url":"https://api.github.com/users/DennisLfromGA/repos","events_url":"https://api.github.com/users/DennisLfromGA/events{/privacy}","received_events_url":"https://api.github.com/users/DennisLfromGA/received_events","type":"User","site_admin":false},"body":"Per Issue https://github.com/dnschneid/crouton/issues/2108 - Add destination size tests:\r\nIf the CHROOTS partition size is less than 4 GB, spit out a warning. If CHROOTS free space is less than 2GB, spit out a warning. Also, determine whether the former is due to a Chrubuntu install.\r\n \r\n","created_at":"2015-11-15T20:28:42Z","updated_at":"2015-12-29T23:36:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9006c83e85db0df2de21fa4463b91089122acde1","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dnschneid/crouton/pulls/2240/commits","review_comments_url":"https://api.github.com/repos/dnschneid/crouton/pulls/2240/comments","review_comment_url":"https://api.github.com/repos/dnschneid/crouton/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dnschneid/crouton/issues/2240/comments","statuses_url":"https://api.github.com/repos/dnschneid/crouton/statuses/152e56c2611979d0401105c97dc03703a51eff35","head":{"label":"DennisLfromGA:size-tests","ref":"size-tests","sha":"152e56c2611979d0401105c97dc03703a51eff35","user":{"login":"DennisLfromGA","id":3418772,"avatar_url":"https://avatars.githubusercontent.com/u/3418772?v=3","gravatar_id":"","url":"https://api.github.com/users/DennisLfromGA","html_url":"https://github.com/DennisLfromGA","followers_url":"https://api.github.com/users/DennisLfromGA/followers","following_url":"https://api.github.com/users/DennisLfromGA/following{/other_user}","gists_url":"https://api.github.com/users/DennisLfromGA/gists{/gist_id}","starred_url":"https://api.github.com/users/DennisLfromGA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DennisLfromGA/subscriptions","organizations_url":"https://api.github.com/users/DennisLfromGA/orgs","repos_url":"https://api.github.com/users/DennisLfromGA/repos","events_url":"https://api.github.com/users/DennisLfromGA/events{/privacy}","received_events_url":"https://api.github.com/users/DennisLfromGA/received_events","type":"User","site_admin":false},"repo":{"id":34598153,"name":"crouton","full_name":"DennisLfromGA/crouton","owner":{"login":"DennisLfromGA","id":3418772,"avatar_url":"https://avatars.githubusercontent.com/u/3418772?v=3","gravatar_id":"","url":"https://api.github.com/users/DennisLfromGA","html_url":"https://github.com/DennisLfromGA","followers_url":"https://api.github.com/users/DennisLfromGA/followers","following_url":"https://api.github.com/users/DennisLfromGA/following{/other_user}","gists_url":"https://api.github.com/users/DennisLfromGA/gists{/gist_id}","starred_url":"https://api.github.com/users/DennisLfromGA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DennisLfromGA/subscriptions","organizations_url":"https://api.github.com/users/DennisLfromGA/orgs","repos_url":"https://api.github.com/users/DennisLfromGA/repos","events_url":"https://api.github.com/users/DennisLfromGA/events{/privacy}","received_events_url":"https://api.github.com/users/DennisLfromGA/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/DennisLfromGA/crouton","description":"Chromium OS Universal Chroot Environment","fork":true,"url":"https://api.github.com/repos/DennisLfromGA/crouton","forks_url":"https://api.github.com/repos/DennisLfromGA/crouton/forks","keys_url":"https://api.github.com/repos/DennisLfromGA/crouton/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DennisLfromGA/crouton/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DennisLfromGA/crouton/teams","hooks_url":"https://api.github.com/repos/DennisLfromGA/crouton/hooks","issue_events_url":"https://api.github.com/repos/DennisLfromGA/crouton/issues/events{/number}","events_url":"https://api.github.com/repos/DennisLfromGA/crouton/events","assignees_url":"https://api.github.com/repos/DennisLfromGA/crouton/assignees{/user}","branches_url":"https://api.github.com/repos/DennisLfromGA/crouton/branches{/branch}","tags_url":"https://api.github.com/repos/DennisLfromGA/crouton/tags","blobs_url":"https://api.github.com/repos/DennisLfromGA/crouton/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DennisLfromGA/crouton/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DennisLfromGA/crouton/git/refs{/sha}","trees_url":"https://api.github.com/repos/DennisLfromGA/crouton/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DennisLfromGA/crouton/statuses/{sha}","languages_url":"https://api.github.com/repos/DennisLfromGA/crouton/languages","stargazers_url":"https://api.github.com/repos/DennisLfromGA/crouton/stargazers","contributors_url":"https://api.github.com/repos/DennisLfromGA/crouton/contributors","subscribers_url":"https://api.github.com/repos/DennisLfromGA/crouton/subscribers","subscription_url":"https://api.github.com/repos/DennisLfromGA/crouton/subscription","commits_url":"https://api.github.com/repos/DennisLfromGA/crouton/commits{/sha}","git_commits_url":"https://api.github.com/repos/DennisLfromGA/crouton/git/commits{/sha}","comments_url":"https://api.github.com/repos/DennisLfromGA/crouton/comments{/number}","issue_comment_url":"https://api.github.com/repos/DennisLfromGA/crouton/issues/comments{/number}","contents_url":"https://api.github.com/repos/DennisLfromGA/crouton/contents/{+path}","compare_url":"https://api.github.com/repos/DennisLfromGA/crouton/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DennisLfromGA/crouton/merges","archive_url":"https://api.github.com/repos/DennisLfromGA/crouton/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DennisLfromGA/crouton/downloads","issues_url":"https://api.github.com/repos/DennisLfromGA/crouton/issues{/number}","pulls_url":"https://api.github.com/repos/DennisLfromGA/crouton/pulls{/number}","milestones_url":"https://api.github.com/repos/DennisLfromGA/crouton/milestones{/number}","notifications_url":"https://api.github.com/repos/DennisLfromGA/crouton/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DennisLfromGA/crouton/labels{/name}","releases_url":"https://api.github.com/repos/DennisLfromGA/crouton/releases{/id}","created_at":"2015-04-26T04:41:54Z","updated_at":"2015-04-26T04:41:55Z","pushed_at":"2015-11-05T20:53:27Z","git_url":"git://github.com/DennisLfromGA/crouton.git","ssh_url":"git@github.com:DennisLfromGA/crouton.git","clone_url":"https://github.com/DennisLfromGA/crouton.git","svn_url":"https://github.com/DennisLfromGA/crouton","homepage":"https://goo.gl/fd3zc","size":10913,"stargazers_count":0,"watchers_count":0,"language":"Shell","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":"dnschneid:master","ref":"master","sha":"2a1fc9da380650f47e2bcf37d00962bfb68c4830","user":{"login":"dnschneid","id":522200,"avatar_url":"https://avatars.githubusercontent.com/u/522200?v=3","gravatar_id":"","url":"https://api.github.com/users/dnschneid","html_url":"https://github.com/dnschneid","followers_url":"https://api.github.com/users/dnschneid/followers","following_url":"https://api.github.com/users/dnschneid/following{/other_user}","gists_url":"https://api.github.com/users/dnschneid/gists{/gist_id}","starred_url":"https://api.github.com/users/dnschneid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dnschneid/subscriptions","organizations_url":"https://api.github.com/users/dnschneid/orgs","repos_url":"https://api.github.com/users/dnschneid/repos","events_url":"https://api.github.com/users/dnschneid/events{/privacy}","received_events_url":"https://api.github.com/users/dnschneid/received_events","type":"User","site_admin":false},"repo":{"id":7229063,"name":"crouton","full_name":"dnschneid/crouton","owner":{"login":"dnschneid","id":522200,"avatar_url":"https://avatars.githubusercontent.com/u/522200?v=3","gravatar_id":"","url":"https://api.github.com/users/dnschneid","html_url":"https://github.com/dnschneid","followers_url":"https://api.github.com/users/dnschneid/followers","following_url":"https://api.github.com/users/dnschneid/following{/other_user}","gists_url":"https://api.github.com/users/dnschneid/gists{/gist_id}","starred_url":"https://api.github.com/users/dnschneid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dnschneid/subscriptions","organizations_url":"https://api.github.com/users/dnschneid/orgs","repos_url":"https://api.github.com/users/dnschneid/repos","events_url":"https://api.github.com/users/dnschneid/events{/privacy}","received_events_url":"https://api.github.com/users/dnschneid/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dnschneid/crouton","description":"Chromium OS Universal Chroot Environment","fork":false,"url":"https://api.github.com/repos/dnschneid/crouton","forks_url":"https://api.github.com/repos/dnschneid/crouton/forks","keys_url":"https://api.github.com/repos/dnschneid/crouton/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dnschneid/crouton/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dnschneid/crouton/teams","hooks_url":"https://api.github.com/repos/dnschneid/crouton/hooks","issue_events_url":"https://api.github.com/repos/dnschneid/crouton/issues/events{/number}","events_url":"https://api.github.com/repos/dnschneid/crouton/events","assignees_url":"https://api.github.com/repos/dnschneid/crouton/assignees{/user}","branches_url":"https://api.github.com/repos/dnschneid/crouton/branches{/branch}","tags_url":"https://api.github.com/repos/dnschneid/crouton/tags","blobs_url":"https://api.github.com/repos/dnschneid/crouton/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dnschneid/crouton/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dnschneid/crouton/git/refs{/sha}","trees_url":"https://api.github.com/repos/dnschneid/crouton/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dnschneid/crouton/statuses/{sha}","languages_url":"https://api.github.com/repos/dnschneid/crouton/languages","stargazers_url":"https://api.github.com/repos/dnschneid/crouton/stargazers","contributors_url":"https://api.github.com/repos/dnschneid/crouton/contributors","subscribers_url":"https://api.github.com/repos/dnschneid/crouton/subscribers","subscription_url":"https://api.github.com/repos/dnschneid/crouton/subscription","commits_url":"https://api.github.com/repos/dnschneid/crouton/commits{/sha}","git_commits_url":"https://api.github.com/repos/dnschneid/crouton/git/commits{/sha}","comments_url":"https://api.github.com/repos/dnschneid/crouton/comments{/number}","issue_comment_url":"https://api.github.com/repos/dnschneid/crouton/issues/comments{/number}","contents_url":"https://api.github.com/repos/dnschneid/crouton/contents/{+path}","compare_url":"https://api.github.com/repos/dnschneid/crouton/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dnschneid/crouton/merges","archive_url":"https://api.github.com/repos/dnschneid/crouton/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dnschneid/crouton/downloads","issues_url":"https://api.github.com/repos/dnschneid/crouton/issues{/number}","pulls_url":"https://api.github.com/repos/dnschneid/crouton/pulls{/number}","milestones_url":"https://api.github.com/repos/dnschneid/crouton/milestones{/number}","notifications_url":"https://api.github.com/repos/dnschneid/crouton/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dnschneid/crouton/labels{/name}","releases_url":"https://api.github.com/repos/dnschneid/crouton/releases{/id}","created_at":"2012-12-18T19:31:14Z","updated_at":"2015-12-29T18:55:17Z","pushed_at":"2015-12-29T21:01:50Z","git_url":"git://github.com/dnschneid/crouton.git","ssh_url":"git@github.com:dnschneid/crouton.git","clone_url":"https://github.com/dnschneid/crouton.git","svn_url":"https://github.com/dnschneid/crouton","homepage":"https://goo.gl/fd3zc","size":18709,"stargazers_count":3817,"watchers_count":3817,"language":"Shell","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":481,"mirror_url":null,"open_issues_count":431,"forks":481,"open_issues":431,"watchers":3817,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dnschneid/crouton/pulls/2240"},"html":{"href":"https://github.com/dnschneid/crouton/pull/2240"},"issue":{"href":"https://api.github.com/repos/dnschneid/crouton/issues/2240"},"comments":{"href":"https://api.github.com/repos/dnschneid/crouton/issues/2240/comments"},"review_comments":{"href":"https://api.github.com/repos/dnschneid/crouton/pulls/2240/comments"},"review_comment":{"href":"https://api.github.com/repos/dnschneid/crouton/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dnschneid/crouton/pulls/2240/commits"},"statuses":{"href":"https://api.github.com/repos/dnschneid/crouton/statuses/152e56c2611979d0401105c97dc03703a51eff35"}}}}