diff options
Diffstat (limited to 'contrib/package')
4 files changed, 100 insertions, 41 deletions
diff --git a/contrib/package/community-profiles/files/etc/config/profile_bno b/contrib/package/community-profiles/files/etc/config/profile_bno deleted file mode 100644 index 2d0f0f5bad..0000000000 --- a/contrib/package/community-profiles/files/etc/config/profile_bno +++ /dev/null @@ -1,38 +0,0 @@ -config 'community' 'profile' - option 'name' 'Berlin NordOst' - option 'homepage' 'http://www.freifunk-bno.de/' - option 'ssid' 'olsr.freifunk.net' - option 'mesh_network' '104.0.0.0/8' - option 'splash_network' '10.104.0.0/16' - option 'splash_prefix' '27' - option 'latitude' '52.55010' - option 'longitude' '13.45889' - option 'suffix' 'olsr' - list 'owm_api' 'http://api.openwifimap.net' - list 'owm_api' 'http://owmapi.pberg.freifunk.net' - option 'mapserver' 'http://map.pberg.freifunk.net/' - -config 'defaults' 'wifi_device' - option 'channel' '10' - -config 'defaults' 'interface' - option 'netmask' '255.0.0.0' - -config 'defaults' 'olsr_interface' - option 'Ip4Broadcast' '255.255.255.255' - option 'HelloInterval' '3.0' - option 'HelloValidityTime' '125.0' - option 'TcInterval' '2.0' - option 'TcValidityTime' '500.0' - option 'MidInterval' '25.0' - option 'MidValidityTime' '500.0' - option 'HnaInterval' '10.0' - option 'HnaValidityTime' '125.0' - -config 'defaults' 'olsrd' - option 'AllowNoInt' 'yes' - option 'FIBMetric' 'flat' - option 'Pollrate' '0.025' - option 'TcRedundancy' '2' - option 'NatThreshold' '0.75' - option 'LinkQualityAlgorithm' 'etx_ff' diff --git a/contrib/package/community-profiles/files/etc/config/profile_cottbus b/contrib/package/community-profiles/files/etc/config/profile_cottbus new file mode 100644 index 0000000000..143c505c0b --- /dev/null +++ b/contrib/package/community-profiles/files/etc/config/profile_cottbus @@ -0,0 +1,37 @@ +config 'community' 'profile' + option 'name' 'Freifunk Cottbus' + option 'homepage' 'http://cottbus.freifunk.net' + option 'ssid' 'cottbus.freifunk.net' + option 'ssid_scheme' 'ssidonly' + option 'mesh_network' '10.35.0.0/16' + option 'splash_network' '10.104.0.0/16' + option 'splash_prefix' '27' + option 'latitude' '51.757689' + option 'longitude' '13.40948' + +config 'defaults' 'wifi_device' + option 'channel' '13' + +config 'defaults' 'wifi_device_5' + option 'channel' '36' + +config 'defaults' 'wifi_iface' + option 'mcast_rate' '6000' + +config 'defaults' 'wifi_iface_5' + option 'mcast_rate' '12000' + +config 'defaults' 'bssidscheme' + option '13' 'D2:CA:FF:EE:BA:BE' + option '36' '02:36:CA:FF:EE:EE' + +config 'defaults' 'ssidscheme' + option '13' 'intern-ch13.cottbus.freifunk.net' + option '36' 'intern-ch36.cottbus.freifunk.net' + +config 'defaults' 'interface' + option 'netmask' '255.255.255.255' + option 'dns' '85.214.20.141 213.73.91.35 194.150.168.168 2001:4ce8::53 2001:910:800::12' + +config 'dhcp' 'dhcp' + option 'leasetime' '5m' diff --git a/contrib/package/freifunk-common/files/usr/bin/neigh.sh b/contrib/package/freifunk-common/files/usr/bin/neigh.sh index cf4342450c..b1dc01a77e 100755 --- a/contrib/package/freifunk-common/files/usr/bin/neigh.sh +++ b/contrib/package/freifunk-common/files/usr/bin/neigh.sh @@ -2,9 +2,69 @@ . /usr/share/libubox/jshn.sh -VARS="localIP:Local remoteIP:Remote validityTime:vTime linkQuality:LQ neighborLinkQuality:NLQ linkCost:Cost" +hostsfile_getname() +{ + local config="$1" + local i=0 + local value file -for HOST in 127.0.0.1 ::1;do + while value="$( uci -q get $config.@LoadPlugin[$i].library )"; do { + case "$value" in + 'olsrd_nameservice.so.'*) + file="$( uci -q get $config.@LoadPlugin[$i].hosts_file )" + break + ;; + esac + + i=$(( i + 1 )) + } done + + echo "${file:-/var/run/hosts_olsr}" +} + +read_hostnames() +{ + local file_list=" $( hostsfile_getname 'olsrd' ) $(hostsfile_getname 'olsrd6' ) " + local line ip hostname file file_list_uniq + + for file in $file_list; do { + case " $file_list_uniq " in + *" $file "*) + ;; + *) + file_list_uniq="$file_list_uniq $file" + ;; + esac + } done + + for file in $file_list_uniq; do { + [ -e "$file" ] || continue + + while read -r line; do { + case "$line" in + [0-9]*) + # 2001:bf7:820:901::1 stuttgarter-core.olsr # myself + # 10.63.160.161 AlexLaterne # 10.63.160.161 + set -f + set +f -- $line + ip="$1" + hostname="$2" + + # global vars, e.g. + # IP_1_2_3_4='foo' or IP_2001_bf7_820_901__1='bar' + eval IP_${ip//[.:]/_}="$hostname" + ;; + esac + } done <"$file" + } done +} + +read_hostnames + +VARS='localIP:Local remoteIP:Remote validityTime:vTime linkQuality:LQ' +VARS="$VARS neighborLinkQuality:NLQ linkCost:Cost remoteHostname:Host" + +for HOST in '127.0.0.1' '::1';do json_init json_load "$(echo /links|nc ${HOST} 9090)" if json_is_a links array;then @@ -29,6 +89,7 @@ for HOST in 127.0.0.1 ::1;do ;;*) for v in ${VARS};do eval printf \"%-\${_${v%:*}}s \" \$${v%:*} + eval remoteHostname="\$IP_${remoteIP//[.:]/_}" done echo ;;esac diff --git a/contrib/package/freifunk-policyrouting/files/etc/rc.d/S15-freifunk-policyrouting b/contrib/package/freifunk-policyrouting/files/etc/rc.d/S15-freifunk-policyrouting deleted file mode 120000 index 3c3dad87d1..0000000000 --- a/contrib/package/freifunk-policyrouting/files/etc/rc.d/S15-freifunk-policyrouting +++ /dev/null @@ -1 +0,0 @@ -../init.d/freifunk-policyrouting
\ No newline at end of file |