{"action":"created","comment":{"url":"https://api.github.com/repos/ffac/gluon-ssid-changer/pulls/comments/73229246","id":73229246,"diff_hunk":"@@ -6,44 +6,44 @@ ONLINE_SSID=$(uci get wireless.client_radio0.ssid -q)\n : ${ONLINE_SSID:=FREIFUNK}   # if for whatever reason ONLINE_SSID is NULL\n OFFLINE_PREFIX='FF_OFFLINE_' # Use something short to leave space for the nodename\n \n-UPPER_LIMIT='55' #Above this limit the online SSID will be used\n-LOWER_LIMIT='45' #Below this limit the offline SSID will be used\n+UPPER_LIMIT='55' # Above this limit the online SSID will be used\n+LOWER_LIMIT='45' # Below this limit the offline SSID will be used\n # In-between these two values the SSID will never be changed to preven it from toggeling every Minute.\n \n # Generate an Offline SSID with the first and last Part of the nodename to allow owner to recognise wich node is down\n NODENAME=`uname -n`\n-if [ ${#NODENAME} -gt $((30 - ${#OFFLINE_PREFIX})) ] ; then #32 would be possible as well\n-\tHALF=$(( (28 - ${#OFFLINE_PREFIX} ) / 2 )) #calculate the length of the first part of the node identifier in the offline-ssid\n-\tSKIP=$(( ${#NODENAME} - $HALF )) #jump to this charakter for the last part of the name\n+if [ ${#NODENAME} -gt $((30 - ${#OFFLINE_PREFIX})) ] ; then # 32 would be possible as well\n+\tHALF=$(( (28 - ${#OFFLINE_PREFIX} ) / 2 )) # calculate the length of the first part of the node identifier in the offline-ssid\n+\tSKIP=$(( ${#NODENAME} - $HALF )) # jump to this charakter for the last part of the name\n \tOFFLINE_SSID=$OFFLINE_PREFIX${NODENAME:0:$HALF}...${NODENAME:$SKIP:${#NODENAME}} # use the first and last part of the nodename for nodes with long name\n else\n-\tOFFLINE_SSID=\"$OFFLINE_PREFIX$NODENAME\" #greate we are able to use the full nodename in the offline ssid\n+\tOFFLINE_SSID=\"$OFFLINE_PREFIX$NODENAME\" # great! we are able to use the full nodename in the offline ssid\n fi\n \n-#Is there an active Gateway?\n-GATEWAY_TQ=`batctl gwl | grep \"^=>\" | awk -F'[()]' '{print $2}'| tr -d \" \"` #Grep the Connection Quality of the Gateway which is currently used\n+#is there an active gateway?\n+GATEWAY_TQ=$(batctl gwl | grep \"^=>\" | awk -F '[()]' '{print $2}' | tr -d \" \") # grep the connection quality of the currently used gateway\n \n-if [ ! $GATEWAY_TQ ]; #If there is no gateway there will be errors in the following if clauses\n+if [ ! $GATEWAY_TQ ]; # if there is no gateway there will be errors in the following if clauses\n then\n-\tGATEWAY_TQ=0 #Just an easy way to get an valid value if there is no gatway\n+\tGATEWAY_TQ=0 # just an easy way to get a valid value if there is no gateway\n fi\n \n if [ $GATEWAY_TQ -gt $UPPER_LIMIT ];\n then\n \techo \"Gateway TQ is $GATEWAY_TQ node is online\"\n-\tfor HOSTAPD in $(ls /var/run/hostapd-phy*); do #Check status for all physical devices\n+\tfor HOSTAPD in $(ls /var/run/hostapd-phy*); do # check status for all physical devices\n \t\tCURRENT_SSID=`grep \"^ssid=$ONLINE_SSID\" $HOSTAPD | cut -d\"=\" -f2`\n-\t\tif [ $CURRENT_SSID == $ONLINE_SSID ]\n+\t\tif [ \"X$CURRENT_SSID\" == \"X$ONLINE_SSID\" ]\n \t\tthen\n \t\t\techo \"SSID $CURRENT_SSID is correct, noting to do\"\n \t\t\tHUP_NEEDED=0\n \t\t\tbreak\n \t\tfi\n \t\tCURRENT_SSID=`grep \"^ssid=$OFFLINE_SSID\" $HOSTAPD | cut -d\"=\" -f2`\n-\t\tif [ $CURRENT_SSID == $OFFLINE_SSID ]\n+\t\tif [ \"X$CURRENT_SSID\" == \"X$OFFLINE_SSID\" ]","path":"files/lib/gluon/ssid-changer/ssid-changer.sh","position":51,"original_position":51,"commit_id":"8253b1fd9fabb3f04e01db8674128a9265c78cd0","original_commit_id":"8253b1fd9fabb3f04e01db8674128a9265c78cd0","user":{"login":"mruettgers","id":1706429,"avatar_url":"https://avatars.githubusercontent.com/u/1706429?v=3","gravatar_id":"","url":"https://api.github.com/users/mruettgers","html_url":"https://github.com/mruettgers","followers_url":"https://api.github.com/users/mruettgers/followers","following_url":"https://api.github.com/users/mruettgers/following{/other_user}","gists_url":"https://api.github.com/users/mruettgers/gists{/gist_id}","starred_url":"https://api.github.com/users/mruettgers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mruettgers/subscriptions","organizations_url":"https://api.github.com/users/mruettgers/orgs","repos_url":"https://api.github.com/users/mruettgers/repos","events_url":"https://api.github.com/users/mruettgers/events{/privacy}","received_events_url":"https://api.github.com/users/mruettgers/received_events","type":"User","site_admin":false},"body":"See above","created_at":"2016-08-02T20:20:03Z","updated_at":"2016-08-02T20:20:03Z","html_url":"https://github.com/ffac/gluon-ssid-changer/pull/25#discussion_r73229246","pull_request_url":"https://api.github.com/repos/ffac/gluon-ssid-changer/pulls/25","_links":{"self":{"href":"https://api.github.com/repos/ffac/gluon-ssid-changer/pulls/comments/73229246"},"html":{"href":"https://github.com/ffac/gluon-ssid-changer/pull/25#discussion_r73229246"},"pull_request":{"href":"https://api.github.com/repos/ffac/gluon-ssid-changer/pulls/25"}}},"pull_request":{"url":"https://api.github.com/repos/ffac/gluon-ssid-changer/pulls/25","id":79796767,"html_url":"https://github.com/ffac/gluon-ssid-changer/pull/25","diff_url":"https://github.com/ffac/gluon-ssid-changer/pull/25.diff","patch_url":"https://github.com/ffac/gluon-ssid-changer/pull/25.patch","issue_url":"https://api.github.com/repos/ffac/gluon-ssid-changer/issues/25","number":25,"state":"open","locked":false,"title":"Allow SSIDs containing slashes","user":{"login":"rubo77","id":1591563,"avatar_url":"https://avatars.githubusercontent.com/u/1591563?v=3","gravatar_id":"","url":"https://api.github.com/users/rubo77","html_url":"https://github.com/rubo77","followers_url":"https://api.github.com/users/rubo77/followers","following_url":"https://api.github.com/users/rubo77/following{/other_user}","gists_url":"https://api.github.com/users/rubo77/gists{/gist_id}","starred_url":"https://api.github.com/users/rubo77/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rubo77/subscriptions","organizations_url":"https://api.github.com/users/rubo77/orgs","repos_url":"https://api.github.com/users/rubo77/repos","events_url":"https://api.github.com/users/rubo77/events{/privacy}","received_events_url":"https://api.github.com/users/rubo77/received_events","type":"User","site_admin":false},"body":"\r\ncloses https://github.com/ffac/gluon-ssid-changer/issues/24","created_at":"2016-08-02T19:47:48Z","updated_at":"2016-08-02T20:20:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d2ec2348704ecf54ce6401d46950fba98af3ff4e","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ffac/gluon-ssid-changer/pulls/25/commits","review_comments_url":"https://api.github.com/repos/ffac/gluon-ssid-changer/pulls/25/comments","review_comment_url":"https://api.github.com/repos/ffac/gluon-ssid-changer/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ffac/gluon-ssid-changer/issues/25/comments","statuses_url":"https://api.github.com/repos/ffac/gluon-ssid-changer/statuses/8253b1fd9fabb3f04e01db8674128a9265c78cd0","head":{"label":"rubo77:fix-sed","ref":"fix-sed","sha":"8253b1fd9fabb3f04e01db8674128a9265c78cd0","user":{"login":"rubo77","id":1591563,"avatar_url":"https://avatars.githubusercontent.com/u/1591563?v=3","gravatar_id":"","url":"https://api.github.com/users/rubo77","html_url":"https://github.com/rubo77","followers_url":"https://api.github.com/users/rubo77/followers","following_url":"https://api.github.com/users/rubo77/following{/other_user}","gists_url":"https://api.github.com/users/rubo77/gists{/gist_id}","starred_url":"https://api.github.com/users/rubo77/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rubo77/subscriptions","organizations_url":"https://api.github.com/users/rubo77/orgs","repos_url":"https://api.github.com/users/rubo77/repos","events_url":"https://api.github.com/users/rubo77/events{/privacy}","received_events_url":"https://api.github.com/users/rubo77/received_events","type":"User","site_admin":false},"repo":{"id":64704203,"name":"gluon-ssid-changer","full_name":"rubo77/gluon-ssid-changer","owner":{"login":"rubo77","id":1591563,"avatar_url":"https://avatars.githubusercontent.com/u/1591563?v=3","gravatar_id":"","url":"https://api.github.com/users/rubo77","html_url":"https://github.com/rubo77","followers_url":"https://api.github.com/users/rubo77/followers","following_url":"https://api.github.com/users/rubo77/following{/other_user}","gists_url":"https://api.github.com/users/rubo77/gists{/gist_id}","starred_url":"https://api.github.com/users/rubo77/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rubo77/subscriptions","organizations_url":"https://api.github.com/users/rubo77/orgs","repos_url":"https://api.github.com/users/rubo77/repos","events_url":"https://api.github.com/users/rubo77/events{/privacy}","received_events_url":"https://api.github.com/users/rubo77/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rubo77/gluon-ssid-changer","description":null,"fork":true,"url":"https://api.github.com/repos/rubo77/gluon-ssid-changer","forks_url":"https://api.github.com/repos/rubo77/gluon-ssid-changer/forks","keys_url":"https://api.github.com/repos/rubo77/gluon-ssid-changer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rubo77/gluon-ssid-changer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rubo77/gluon-ssid-changer/teams","hooks_url":"https://api.github.com/repos/rubo77/gluon-ssid-changer/hooks","issue_events_url":"https://api.github.com/repos/rubo77/gluon-ssid-changer/issues/events{/number}","events_url":"https://api.github.com/repos/rubo77/gluon-ssid-changer/events","assignees_url":"https://api.github.com/repos/rubo77/gluon-ssid-changer/assignees{/user}","branches_url":"https://api.github.com/repos/rubo77/gluon-ssid-changer/branches{/branch}","tags_url":"https://api.github.com/repos/rubo77/gluon-ssid-changer/tags","blobs_url":"https://api.github.com/repos/rubo77/gluon-ssid-changer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rubo77/gluon-ssid-changer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rubo77/gluon-ssid-changer/git/refs{/sha}","trees_url":"https://api.github.com/repos/rubo77/gluon-ssid-changer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rubo77/gluon-ssid-changer/statuses/{sha}","languages_url":"https://api.github.com/repos/rubo77/gluon-ssid-changer/languages","stargazers_url":"https://api.github.com/repos/rubo77/gluon-ssid-changer/stargazers","contributors_url":"https://api.github.com/repos/rubo77/gluon-ssid-changer/contributors","subscribers_url":"https://api.github.com/repos/rubo77/gluon-ssid-changer/subscribers","subscription_url":"https://api.github.com/repos/rubo77/gluon-ssid-changer/subscription","commits_url":"https://api.github.com/repos/rubo77/gluon-ssid-changer/commits{/sha}","git_commits_url":"https://api.github.com/repos/rubo77/gluon-ssid-changer/git/commits{/sha}","comments_url":"https://api.github.com/repos/rubo77/gluon-ssid-changer/comments{/number}","issue_comment_url":"https://api.github.com/repos/rubo77/gluon-ssid-changer/issues/comments{/number}","contents_url":"https://api.github.com/repos/rubo77/gluon-ssid-changer/contents/{+path}","compare_url":"https://api.github.com/repos/rubo77/gluon-ssid-changer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rubo77/gluon-ssid-changer/merges","archive_url":"https://api.github.com/repos/rubo77/gluon-ssid-changer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rubo77/gluon-ssid-changer/downloads","issues_url":"https://api.github.com/repos/rubo77/gluon-ssid-changer/issues{/number}","pulls_url":"https://api.github.com/repos/rubo77/gluon-ssid-changer/pulls{/number}","milestones_url":"https://api.github.com/repos/rubo77/gluon-ssid-changer/milestones{/number}","notifications_url":"https://api.github.com/repos/rubo77/gluon-ssid-changer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rubo77/gluon-ssid-changer/labels{/name}","releases_url":"https://api.github.com/repos/rubo77/gluon-ssid-changer/releases{/id}","deployments_url":"https://api.github.com/repos/rubo77/gluon-ssid-changer/deployments","created_at":"2016-08-01T21:53:18Z","updated_at":"2016-08-02T13:52:33Z","pushed_at":"2016-08-02T19:50:22Z","git_url":"git://github.com/rubo77/gluon-ssid-changer.git","ssh_url":"git@github.com:rubo77/gluon-ssid-changer.git","clone_url":"https://github.com/rubo77/gluon-ssid-changer.git","svn_url":"https://github.com/rubo77/gluon-ssid-changer","homepage":null,"size":23,"stargazers_count":0,"watchers_count":0,"language":"Shell","has_issues":true,"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":"ffac:chaos-calmer","ref":"chaos-calmer","sha":"dfb9063787b94e246e72a330f6a221e391495b4b","user":{"login":"ffac","id":8763890,"avatar_url":"https://avatars.githubusercontent.com/u/8763890?v=3","gravatar_id":"","url":"https://api.github.com/users/ffac","html_url":"https://github.com/ffac","followers_url":"https://api.github.com/users/ffac/followers","following_url":"https://api.github.com/users/ffac/following{/other_user}","gists_url":"https://api.github.com/users/ffac/gists{/gist_id}","starred_url":"https://api.github.com/users/ffac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ffac/subscriptions","organizations_url":"https://api.github.com/users/ffac/orgs","repos_url":"https://api.github.com/users/ffac/repos","events_url":"https://api.github.com/users/ffac/events{/privacy}","received_events_url":"https://api.github.com/users/ffac/received_events","type":"Organization","site_admin":false},"repo":{"id":43643480,"name":"gluon-ssid-changer","full_name":"ffac/gluon-ssid-changer","owner":{"login":"ffac","id":8763890,"avatar_url":"https://avatars.githubusercontent.com/u/8763890?v=3","gravatar_id":"","url":"https://api.github.com/users/ffac","html_url":"https://github.com/ffac","followers_url":"https://api.github.com/users/ffac/followers","following_url":"https://api.github.com/users/ffac/following{/other_user}","gists_url":"https://api.github.com/users/ffac/gists{/gist_id}","starred_url":"https://api.github.com/users/ffac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ffac/subscriptions","organizations_url":"https://api.github.com/users/ffac/orgs","repos_url":"https://api.github.com/users/ffac/repos","events_url":"https://api.github.com/users/ffac/events{/privacy}","received_events_url":"https://api.github.com/users/ffac/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ffac/gluon-ssid-changer","description":"","fork":false,"url":"https://api.github.com/repos/ffac/gluon-ssid-changer","forks_url":"https://api.github.com/repos/ffac/gluon-ssid-changer/forks","keys_url":"https://api.github.com/repos/ffac/gluon-ssid-changer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ffac/gluon-ssid-changer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ffac/gluon-ssid-changer/teams","hooks_url":"https://api.github.com/repos/ffac/gluon-ssid-changer/hooks","issue_events_url":"https://api.github.com/repos/ffac/gluon-ssid-changer/issues/events{/number}","events_url":"https://api.github.com/repos/ffac/gluon-ssid-changer/events","assignees_url":"https://api.github.com/repos/ffac/gluon-ssid-changer/assignees{/user}","branches_url":"https://api.github.com/repos/ffac/gluon-ssid-changer/branches{/branch}","tags_url":"https://api.github.com/repos/ffac/gluon-ssid-changer/tags","blobs_url":"https://api.github.com/repos/ffac/gluon-ssid-changer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ffac/gluon-ssid-changer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ffac/gluon-ssid-changer/git/refs{/sha}","trees_url":"https://api.github.com/repos/ffac/gluon-ssid-changer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ffac/gluon-ssid-changer/statuses/{sha}","languages_url":"https://api.github.com/repos/ffac/gluon-ssid-changer/languages","stargazers_url":"https://api.github.com/repos/ffac/gluon-ssid-changer/stargazers","contributors_url":"https://api.github.com/repos/ffac/gluon-ssid-changer/contributors","subscribers_url":"https://api.github.com/repos/ffac/gluon-ssid-changer/subscribers","subscription_url":"https://api.github.com/repos/ffac/gluon-ssid-changer/subscription","commits_url":"https://api.github.com/repos/ffac/gluon-ssid-changer/commits{/sha}","git_commits_url":"https://api.github.com/repos/ffac/gluon-ssid-changer/git/commits{/sha}","comments_url":"https://api.github.com/repos/ffac/gluon-ssid-changer/comments{/number}","issue_comment_url":"https://api.github.com/repos/ffac/gluon-ssid-changer/issues/comments{/number}","contents_url":"https://api.github.com/repos/ffac/gluon-ssid-changer/contents/{+path}","compare_url":"https://api.github.com/repos/ffac/gluon-ssid-changer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ffac/gluon-ssid-changer/merges","archive_url":"https://api.github.com/repos/ffac/gluon-ssid-changer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ffac/gluon-ssid-changer/downloads","issues_url":"https://api.github.com/repos/ffac/gluon-ssid-changer/issues{/number}","pulls_url":"https://api.github.com/repos/ffac/gluon-ssid-changer/pulls{/number}","milestones_url":"https://api.github.com/repos/ffac/gluon-ssid-changer/milestones{/number}","notifications_url":"https://api.github.com/repos/ffac/gluon-ssid-changer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ffac/gluon-ssid-changer/labels{/name}","releases_url":"https://api.github.com/repos/ffac/gluon-ssid-changer/releases{/id}","deployments_url":"https://api.github.com/repos/ffac/gluon-ssid-changer/deployments","created_at":"2015-10-04T16:38:24Z","updated_at":"2016-02-03T11:47:52Z","pushed_at":"2016-08-02T19:50:22Z","git_url":"git://github.com/ffac/gluon-ssid-changer.git","ssh_url":"git@github.com:ffac/gluon-ssid-changer.git","clone_url":"https://github.com/ffac/gluon-ssid-changer.git","svn_url":"https://github.com/ffac/gluon-ssid-changer","homepage":null,"size":26,"stargazers_count":4,"watchers_count":4,"language":"Shell","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":14,"mirror_url":null,"open_issues_count":6,"forks":14,"open_issues":6,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ffac/gluon-ssid-changer/pulls/25"},"html":{"href":"https://github.com/ffac/gluon-ssid-changer/pull/25"},"issue":{"href":"https://api.github.com/repos/ffac/gluon-ssid-changer/issues/25"},"comments":{"href":"https://api.github.com/repos/ffac/gluon-ssid-changer/issues/25/comments"},"review_comments":{"href":"https://api.github.com/repos/ffac/gluon-ssid-changer/pulls/25/comments"},"review_comment":{"href":"https://api.github.com/repos/ffac/gluon-ssid-changer/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ffac/gluon-ssid-changer/pulls/25/commits"},"statuses":{"href":"https://api.github.com/repos/ffac/gluon-ssid-changer/statuses/8253b1fd9fabb3f04e01db8674128a9265c78cd0"}}}}
{"actor":{"display_login":"mruettgers"}}