diff --git a/README.md b/README.md index 5b2cb4e62ee4f91b3d36f7b4ecca5bdea7aef11a..107ff49625902a67bec7e854b6409038e6bc74c2 100644 --- a/README.md +++ b/README.md @@ -9,36 +9,19 @@ decides if a change of the SSID is necessary. *It is a simplified rewrite of https://github.com/ffac/gluon-ssid-changer that doesn't check the tx value any more. It is in use in Freifunk Freiburg* -emergency.sh -============ -this repository also includes an emergency script which checks for a working batman-adv -gateway connection. If no Gateway connection exists some countermeasures are started: - - - 3 min offline - call `wifi` - - 5 min offline - restart fastd - - 7 min offline - restart networking - -If no countermeasure works bringing the node online again, the router will be enforced -to reboot after 10 minutes. - -*Note: this script may cause a problem for users, that use the node on purposes intended -to work without functioning gateway connectivity, for example as a switch (disable -the cronjob there).* - Gluon versions ============== -This branch of the skript contains the the ssid-changer version for the gluon 2016.1.x -based on openwrt `chaos-calmer`. There is also a pre 2016.1 (barrier braker based) -version in the branch `master`. It will probably not work in 2016.2 yet. +This branch of the skript contains the the ssid-changer version for the gluon 2016.1.x. It might probably not work in 2016.2 yet. Implement this package in your firmware ======================================= -Create a file "modules" with the following content in your -<a href="https://github.com/ffac/site/tree/offline-ssid"> site directory:</a> - -GLUON_SITE_FEEDS="ssidchanger"<br> -PACKAGES_SSIDCHANGER_REPO=https://github.com/viisauksena/gluon-ssid-changer.git<br> -PACKAGES_SSIDCHANGER_COMMIT=f135ba05913feb4451e4cf067b735b095a4ee243<br> -PACKAGES_SSIDCHANGER_BRANCH=chaos-calmer<br> +Create a file "modules" with the following content in your site directory: + +``` +GLUON_SITE_FEEDS="ssidchanger" +PACKAGES_SSIDCHANGER_REPO=https://github.com/freifunk-nord/gluon-ssid-changer.git +PACKAGES_SSIDCHANGER_COMMIT=bc81df8a5a3e19c524f0ea9ede3ae4ab79bb01fd +PACKAGES_SSIDCHANGER_BRANCH=master +``` With this done you can add the package gluon-ssid-changer to your site.mk diff --git a/files/lib/gluon/ssid-changer/emergency.sh b/files/lib/gluon/ssid-changer/emergency.sh deleted file mode 100755 index cd3ef19ba3bb663476a35228d50c52dcaf0cb39f..0000000000000000000000000000000000000000 --- a/files/lib/gluon/ssid-changer/emergency.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/sh - -# set some sysctl -# see kernel.org/doc/Documentation/sysctl/vm.txt -# sysctl -w vm.panic_on_oom=0 # deact reboot on oom -# sysctl -w kernel.panic=80 # 80s after panic reboot -# sysctl -w vm.overcommit_memory=2 # calc if enough mem is avail mmaloc -# echo 100 > /proc/sys/vm/overcommit_ratio # max % useable mem -# echo 0 > /proc/sys/vm/user_reserve_kbytes # only root need reserve -# echo 128 > /proc/sys/vm/lowmem_reserve_ratio - -# raise prob. of proc to kill -# echo 10 > /proc/$(cat /var/run/fastd.mesh_vpn.pid)/oom_adj # deprecated -echo 700 > /proc/$(pgrep fastd)/oom_score_adj # fastd -echo 900 > /proc/$(pgrep ntp)/oom_score_adj # ntp -echo 950 > /proc/$(pgrep /usr/sbin/batadv-vis)/oom_score_adj # batvis - -# if we see bat GW just exit -netz=$(batctl gwl -H|grep -v "gateways in range"|wc -l) -if [ $netz -ne 0 ] ; then - echo "$0 found GW in network, exiting" - echo 0 > /tmp/emergency - exit 0 -fi - -# see ath9k for stopped -# cat /sys/kernel/debug/ieee80211/phy0/ath9k/queues - -# simple counter -touch /tmp/emergency -counter=$(cat /tmp/emergency) -if [ -z $counter ] ; then counter=0 ; fi -if [ $counter -lt 10 ] - then - let counter+=1 - echo $counter > /tmp/emergency - if [ $counter -eq 3 ]; then echo "$0 - 3 min offline - try wifi"|logger; wifi ; fi - if [ $counter -eq 5 ]; then echo "$0 - 5 min offline - try restart fastd"|logger; /etc/init.d/fastd restart ; fi - if [ $counter -eq 7 ]; then echo "$0 - 7 min offline - try restart network"|logger; /etc/init.d/network restart ; fi - else reboot -fi -echo $counter diff --git a/files/usr/lib/micron.d/emergency b/files/usr/lib/micron.d/emergency deleted file mode 100755 index fe138ed7ee0ade7dbaaca44f7b718739b4af85d7..0000000000000000000000000000000000000000 --- a/files/usr/lib/micron.d/emergency +++ /dev/null @@ -1 +0,0 @@ -* * * * * /lib/gluon/ssid-changer/emergency.sh diff --git a/files/usr/lib/micron.d/ibss-empty b/files/usr/lib/micron.d/ibss-empty deleted file mode 100755 index 89d799cec68665437c5a42cc7ee533bad2dd1e26..0000000000000000000000000000000000000000 --- a/files/usr/lib/micron.d/ibss-empty +++ /dev/null @@ -1 +0,0 @@ -12 * * * * iwinfo phy0 scan