{"action":"created","comment":{"url":"https://api.github.com/repos/virtapi/installimage/pulls/comments/54718107","id":54718107,"diff_hunk":"@@ -61,54 +72,63 @@ setup_network_config() {\n   fi\n }\n \n-# generate_mdadmconf \"NIL\"\n+# generate_config_mdadm \"NIL\"\n generate_config_mdadm() {\n   if [ -n \"$1\" ]; then\n     MDADMCONF=\"/etc/mdadm/mdadm.conf\"\n-#    echo \"DEVICES /dev/[hs]d*\" > $FOLD/hdd$MDADMCONF\n-#    execute_chroot_command \"mdadm --detail --scan | sed -e 's/metadata=00.90/metadata=0.90/g' >> $MDADMCONF\"; declare -i EXITCODE=$?\n+    # echo \"DEVICES /dev/[hs]d*\" > $FOLD/hdd$MDADMCONF\n+    # execute_chroot_command \"mdadm --detail --scan | sed -e 's/metadata=00.90/metadata=0.90/g' >> $MDADMCONF\"; declare -i EXITCODE=$?\n     execute_chroot_command \"/usr/share/mdadm/mkconf > $MDADMCONF\"; declare -i EXITCODE=$?\n+\n+    #\n     # Enable mdadm\n+    #\n     sed -i \"s/AUTOCHECK=false/AUTOCHECK=true # modified by installimage/\" \\\n-        \"$FOLD/hdd/etc/default/mdadm\"\n+      \"$FOLD/hdd/etc/default/mdadm\"\n     sed -i \"s/AUTOSTART=false/AUTOSTART=true # modified by installimage/\" \\\n-        \"$FOLD/hdd/etc/default/mdadm\"\n+      \"$FOLD/hdd/etc/default/mdadm\"\n     sed -i \"s/START_DAEMON=false/START_DAEMON=true # modified by installimage/\" \\\n-        \"$FOLD/hdd/etc/default/mdadm\"\n+      \"$FOLD/hdd/etc/default/mdadm\"\n     sed -i -e \"s/^INITRDSTART=.*/INITRDSTART='all' # modified by installimage/\" \\\n-        \"$FOLD/hdd/etc/default/mdadm\"\n+      \"$FOLD/hdd/etc/default/mdadm\"\n \n     return \"$EXITCODE\"\n   fi\n }\n \n-\n # generate_new_ramdisk \"NIL\"\n generate_new_ramdisk() {\n   if [ -n \"$1\" ]; then\n-    OUTFILE=`ls -1r $FOLD/hdd/boot/initrd.img-* | grep -v \".bak$\\|.gz$\" | awk -F \"/\" '{print $NF}' | grep -m1 \"initrd\"`\n-    VERSION=`echo $OUTFILE |cut -d \"-\" -f2-`\n+    OUTFILE=$(find \"$FOLD\"/hdd/boot -name \"initrd.img-*\" -not -regex \".*\\(gz\\|bak\\)\" -printf \"%f\\n\" | sort -nr | head -n1)\n+    VERSION=$(echo \"$OUTFILE\" |cut -d \"-\" -f2-)\n     echo \"Kernel Version found: $VERSION\" | debugoutput\n \n     if [ \"$IMG_VERSION\" -ge 60 ]; then\n+\n+      #\n       # blacklist i915 driver due to many bugs and stability issues\n+      #\n       local blacklist_conf=\"$FOLD/hdd/etc/modprobe.d/blacklist-hetzner.conf\"\n-      echo \"### $COMPANY - installimage\" > \"$blacklist_conf\"\n-      echo '### silence any onboard speaker' >> \"$blacklist_conf\"\n-      echo 'blacklist pcspkr' >> \"$blacklist_conf\"\n-      echo 'blacklist snd_pcsp' >> \"$blacklist_conf\"\n-      echo '### i915 driver blacklisted due to various bugs' >> \"$blacklist_conf\"\n-      echo '### especially in combination with nomodeset' >> \"$blacklist_conf\"\n-      echo 'blacklist i915' >> \"$blacklist_conf\"\n-      echo '### mei driver blacklisted due to serious bugs' >> \"$blacklist_conf\"\n-      echo 'blacklist mei' >> \"$blacklist_conf\"\n-      echo 'blacklist mei-me' >> \"$blacklist_conf\"\n+      {\n+        echo \"### $COMPANY - installimage\"\n+        echo \"### silence any onboard speaker\"\n+        echo \"blacklist pcspkr\"\n+        echo \"blacklist snd_pcsp\"\n+        echo \"### i915 driver blacklisted due to various bugs\"\n+        echo \"### especially in combination with nomodeset\"\n+        echo \"blacklist i915\"\n+        echo \"### mei driver blacklisted due to serious bugs\"\n+        echo \"blacklist mei\"\n+        echo \"blacklist mei-me\"\n+      } > \"$blacklist_conf\"\n     fi\n \n+    #\n     # just make sure that we do not accidentally try to install a bootloader\n     # when we haven't configured grub yet\n     # Debian won't install a boot loader anyway, but display an error message,\n     # that needs to be confirmed\n+    #","path":"debian.sh","position":155,"original_position":155,"commit_id":"8f2b9a6acbe9bdcd10673a5ac0d6b19ca8c0cd85","original_commit_id":"e648cd3d38cd8898846fedd0c8eea21c053d67e5","user":{"login":"dhxgit","id":1148561,"avatar_url":"https://avatars.githubusercontent.com/u/1148561?v=3","gravatar_id":"","url":"https://api.github.com/users/dhxgit","html_url":"https://github.com/dhxgit","followers_url":"https://api.github.com/users/dhxgit/followers","following_url":"https://api.github.com/users/dhxgit/following{/other_user}","gists_url":"https://api.github.com/users/dhxgit/gists{/gist_id}","starred_url":"https://api.github.com/users/dhxgit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhxgit/subscriptions","organizations_url":"https://api.github.com/users/dhxgit/orgs","repos_url":"https://api.github.com/users/dhxgit/repos","events_url":"https://api.github.com/users/dhxgit/events{/privacy}","received_events_url":"https://api.github.com/users/dhxgit/received_events","type":"User","site_admin":false},"body":"There are to kinds of comments, those that contain higher level descriptions should be easily and clearly visible --> Empty comment line before and after.\r\n\r\nCommented code lines are without any empty comment lines.","created_at":"2016-03-02T12:51:22Z","updated_at":"2016-03-02T12:51:22Z","html_url":"https://github.com/virtapi/installimage/pull/71#discussion_r54718107","pull_request_url":"https://api.github.com/repos/virtapi/installimage/pulls/71","_links":{"self":{"href":"https://api.github.com/repos/virtapi/installimage/pulls/comments/54718107"},"html":{"href":"https://github.com/virtapi/installimage/pull/71#discussion_r54718107"},"pull_request":{"href":"https://api.github.com/repos/virtapi/installimage/pulls/71"}}},"pull_request":{"url":"https://api.github.com/repos/virtapi/installimage/pulls/71","id":60485725,"html_url":"https://github.com/virtapi/installimage/pull/71","diff_url":"https://github.com/virtapi/installimage/pull/71.diff","patch_url":"https://github.com/virtapi/installimage/pull/71.patch","issue_url":"https://api.github.com/repos/virtapi/installimage/issues/71","number":71,"state":"open","locked":false,"title":"[WIP] Validate scripts with shellcheck issue 6","user":{"login":"bastelfreak","id":341866,"avatar_url":"https://avatars.githubusercontent.com/u/341866?v=3","gravatar_id":"","url":"https://api.github.com/users/bastelfreak","html_url":"https://github.com/bastelfreak","followers_url":"https://api.github.com/users/bastelfreak/followers","following_url":"https://api.github.com/users/bastelfreak/following{/other_user}","gists_url":"https://api.github.com/users/bastelfreak/gists{/gist_id}","starred_url":"https://api.github.com/users/bastelfreak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bastelfreak/subscriptions","organizations_url":"https://api.github.com/users/bastelfreak/orgs","repos_url":"https://api.github.com/users/bastelfreak/repos","events_url":"https://api.github.com/users/bastelfreak/events{/privacy}","received_events_url":"https://api.github.com/users/bastelfreak/received_events","type":"User","site_admin":false},"body":"This is a work-in-progress PR, do not merge!\r\n\r\nI just created it for simpler discussion of the changes (because we are almost ready for merge) and for getting a suitable diff (I'm to lazy to always go to /compare)","created_at":"2016-02-24T10:19:24Z","updated_at":"2016-03-02T12:51:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fae032e862944f506bb1bb50d2c09796ccce2554","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/virtapi/installimage/pulls/71/commits","review_comments_url":"https://api.github.com/repos/virtapi/installimage/pulls/71/comments","review_comment_url":"https://api.github.com/repos/virtapi/installimage/pulls/comments{/number}","comments_url":"https://api.github.com/repos/virtapi/installimage/issues/71/comments","statuses_url":"https://api.github.com/repos/virtapi/installimage/statuses/8f2b9a6acbe9bdcd10673a5ac0d6b19ca8c0cd85","head":{"label":"virtapi:validate_scripts_with_shellcheck_issue_6","ref":"validate_scripts_with_shellcheck_issue_6","sha":"8f2b9a6acbe9bdcd10673a5ac0d6b19ca8c0cd85","user":{"login":"virtapi","id":12610395,"avatar_url":"https://avatars.githubusercontent.com/u/12610395?v=3","gravatar_id":"","url":"https://api.github.com/users/virtapi","html_url":"https://github.com/virtapi","followers_url":"https://api.github.com/users/virtapi/followers","following_url":"https://api.github.com/users/virtapi/following{/other_user}","gists_url":"https://api.github.com/users/virtapi/gists{/gist_id}","starred_url":"https://api.github.com/users/virtapi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/virtapi/subscriptions","organizations_url":"https://api.github.com/users/virtapi/orgs","repos_url":"https://api.github.com/users/virtapi/repos","events_url":"https://api.github.com/users/virtapi/events{/privacy}","received_events_url":"https://api.github.com/users/virtapi/received_events","type":"Organization","site_admin":false},"repo":{"id":40267456,"name":"installimage","full_name":"virtapi/installimage","owner":{"login":"virtapi","id":12610395,"avatar_url":"https://avatars.githubusercontent.com/u/12610395?v=3","gravatar_id":"","url":"https://api.github.com/users/virtapi","html_url":"https://github.com/virtapi","followers_url":"https://api.github.com/users/virtapi/followers","following_url":"https://api.github.com/users/virtapi/following{/other_user}","gists_url":"https://api.github.com/users/virtapi/gists{/gist_id}","starred_url":"https://api.github.com/users/virtapi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/virtapi/subscriptions","organizations_url":"https://api.github.com/users/virtapi/orgs","repos_url":"https://api.github.com/users/virtapi/repos","events_url":"https://api.github.com/users/virtapi/events{/privacy}","received_events_url":"https://api.github.com/users/virtapi/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/virtapi/installimage","description":"bash scripts for deploying every linux system","fork":false,"url":"https://api.github.com/repos/virtapi/installimage","forks_url":"https://api.github.com/repos/virtapi/installimage/forks","keys_url":"https://api.github.com/repos/virtapi/installimage/keys{/key_id}","collaborators_url":"https://api.github.com/repos/virtapi/installimage/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/virtapi/installimage/teams","hooks_url":"https://api.github.com/repos/virtapi/installimage/hooks","issue_events_url":"https://api.github.com/repos/virtapi/installimage/issues/events{/number}","events_url":"https://api.github.com/repos/virtapi/installimage/events","assignees_url":"https://api.github.com/repos/virtapi/installimage/assignees{/user}","branches_url":"https://api.github.com/repos/virtapi/installimage/branches{/branch}","tags_url":"https://api.github.com/repos/virtapi/installimage/tags","blobs_url":"https://api.github.com/repos/virtapi/installimage/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/virtapi/installimage/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/virtapi/installimage/git/refs{/sha}","trees_url":"https://api.github.com/repos/virtapi/installimage/git/trees{/sha}","statuses_url":"https://api.github.com/repos/virtapi/installimage/statuses/{sha}","languages_url":"https://api.github.com/repos/virtapi/installimage/languages","stargazers_url":"https://api.github.com/repos/virtapi/installimage/stargazers","contributors_url":"https://api.github.com/repos/virtapi/installimage/contributors","subscribers_url":"https://api.github.com/repos/virtapi/installimage/subscribers","subscription_url":"https://api.github.com/repos/virtapi/installimage/subscription","commits_url":"https://api.github.com/repos/virtapi/installimage/commits{/sha}","git_commits_url":"https://api.github.com/repos/virtapi/installimage/git/commits{/sha}","comments_url":"https://api.github.com/repos/virtapi/installimage/comments{/number}","issue_comment_url":"https://api.github.com/repos/virtapi/installimage/issues/comments{/number}","contents_url":"https://api.github.com/repos/virtapi/installimage/contents/{+path}","compare_url":"https://api.github.com/repos/virtapi/installimage/compare/{base}...{head}","merges_url":"https://api.github.com/repos/virtapi/installimage/merges","archive_url":"https://api.github.com/repos/virtapi/installimage/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/virtapi/installimage/downloads","issues_url":"https://api.github.com/repos/virtapi/installimage/issues{/number}","pulls_url":"https://api.github.com/repos/virtapi/installimage/pulls{/number}","milestones_url":"https://api.github.com/repos/virtapi/installimage/milestones{/number}","notifications_url":"https://api.github.com/repos/virtapi/installimage/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/virtapi/installimage/labels{/name}","releases_url":"https://api.github.com/repos/virtapi/installimage/releases{/id}","deployments_url":"https://api.github.com/repos/virtapi/installimage/deployments","created_at":"2015-08-05T20:31:31Z","updated_at":"2016-02-11T16:15:59Z","pushed_at":"2016-03-02T12:49:24Z","git_url":"git://github.com/virtapi/installimage.git","ssh_url":"git@github.com:virtapi/installimage.git","clone_url":"https://github.com/virtapi/installimage.git","svn_url":"https://github.com/virtapi/installimage","homepage":null,"size":523,"stargazers_count":2,"watchers_count":2,"language":"Shell","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":42,"forks":3,"open_issues":42,"watchers":2,"default_branch":"master"}},"base":{"label":"virtapi:master","ref":"master","sha":"c35d37d76ae9db5baf4ba10a7e6893262052176b","user":{"login":"virtapi","id":12610395,"avatar_url":"https://avatars.githubusercontent.com/u/12610395?v=3","gravatar_id":"","url":"https://api.github.com/users/virtapi","html_url":"https://github.com/virtapi","followers_url":"https://api.github.com/users/virtapi/followers","following_url":"https://api.github.com/users/virtapi/following{/other_user}","gists_url":"https://api.github.com/users/virtapi/gists{/gist_id}","starred_url":"https://api.github.com/users/virtapi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/virtapi/subscriptions","organizations_url":"https://api.github.com/users/virtapi/orgs","repos_url":"https://api.github.com/users/virtapi/repos","events_url":"https://api.github.com/users/virtapi/events{/privacy}","received_events_url":"https://api.github.com/users/virtapi/received_events","type":"Organization","site_admin":false},"repo":{"id":40267456,"name":"installimage","full_name":"virtapi/installimage","owner":{"login":"virtapi","id":12610395,"avatar_url":"https://avatars.githubusercontent.com/u/12610395?v=3","gravatar_id":"","url":"https://api.github.com/users/virtapi","html_url":"https://github.com/virtapi","followers_url":"https://api.github.com/users/virtapi/followers","following_url":"https://api.github.com/users/virtapi/following{/other_user}","gists_url":"https://api.github.com/users/virtapi/gists{/gist_id}","starred_url":"https://api.github.com/users/virtapi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/virtapi/subscriptions","organizations_url":"https://api.github.com/users/virtapi/orgs","repos_url":"https://api.github.com/users/virtapi/repos","events_url":"https://api.github.com/users/virtapi/events{/privacy}","received_events_url":"https://api.github.com/users/virtapi/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/virtapi/installimage","description":"bash scripts for deploying every linux system","fork":false,"url":"https://api.github.com/repos/virtapi/installimage","forks_url":"https://api.github.com/repos/virtapi/installimage/forks","keys_url":"https://api.github.com/repos/virtapi/installimage/keys{/key_id}","collaborators_url":"https://api.github.com/repos/virtapi/installimage/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/virtapi/installimage/teams","hooks_url":"https://api.github.com/repos/virtapi/installimage/hooks","issue_events_url":"https://api.github.com/repos/virtapi/installimage/issues/events{/number}","events_url":"https://api.github.com/repos/virtapi/installimage/events","assignees_url":"https://api.github.com/repos/virtapi/installimage/assignees{/user}","branches_url":"https://api.github.com/repos/virtapi/installimage/branches{/branch}","tags_url":"https://api.github.com/repos/virtapi/installimage/tags","blobs_url":"https://api.github.com/repos/virtapi/installimage/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/virtapi/installimage/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/virtapi/installimage/git/refs{/sha}","trees_url":"https://api.github.com/repos/virtapi/installimage/git/trees{/sha}","statuses_url":"https://api.github.com/repos/virtapi/installimage/statuses/{sha}","languages_url":"https://api.github.com/repos/virtapi/installimage/languages","stargazers_url":"https://api.github.com/repos/virtapi/installimage/stargazers","contributors_url":"https://api.github.com/repos/virtapi/installimage/contributors","subscribers_url":"https://api.github.com/repos/virtapi/installimage/subscribers","subscription_url":"https://api.github.com/repos/virtapi/installimage/subscription","commits_url":"https://api.github.com/repos/virtapi/installimage/commits{/sha}","git_commits_url":"https://api.github.com/repos/virtapi/installimage/git/commits{/sha}","comments_url":"https://api.github.com/repos/virtapi/installimage/comments{/number}","issue_comment_url":"https://api.github.com/repos/virtapi/installimage/issues/comments{/number}","contents_url":"https://api.github.com/repos/virtapi/installimage/contents/{+path}","compare_url":"https://api.github.com/repos/virtapi/installimage/compare/{base}...{head}","merges_url":"https://api.github.com/repos/virtapi/installimage/merges","archive_url":"https://api.github.com/repos/virtapi/installimage/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/virtapi/installimage/downloads","issues_url":"https://api.github.com/repos/virtapi/installimage/issues{/number}","pulls_url":"https://api.github.com/repos/virtapi/installimage/pulls{/number}","milestones_url":"https://api.github.com/repos/virtapi/installimage/milestones{/number}","notifications_url":"https://api.github.com/repos/virtapi/installimage/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/virtapi/installimage/labels{/name}","releases_url":"https://api.github.com/repos/virtapi/installimage/releases{/id}","deployments_url":"https://api.github.com/repos/virtapi/installimage/deployments","created_at":"2015-08-05T20:31:31Z","updated_at":"2016-02-11T16:15:59Z","pushed_at":"2016-03-02T12:49:24Z","git_url":"git://github.com/virtapi/installimage.git","ssh_url":"git@github.com:virtapi/installimage.git","clone_url":"https://github.com/virtapi/installimage.git","svn_url":"https://github.com/virtapi/installimage","homepage":null,"size":523,"stargazers_count":2,"watchers_count":2,"language":"Shell","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":42,"forks":3,"open_issues":42,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/virtapi/installimage/pulls/71"},"html":{"href":"https://github.com/virtapi/installimage/pull/71"},"issue":{"href":"https://api.github.com/repos/virtapi/installimage/issues/71"},"comments":{"href":"https://api.github.com/repos/virtapi/installimage/issues/71/comments"},"review_comments":{"href":"https://api.github.com/repos/virtapi/installimage/pulls/71/comments"},"review_comment":{"href":"https://api.github.com/repos/virtapi/installimage/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/virtapi/installimage/pulls/71/commits"},"statuses":{"href":"https://api.github.com/repos/virtapi/installimage/statuses/8f2b9a6acbe9bdcd10673a5ac0d6b19ca8c0cd85"}}}}