diff options
author | Patrick Grimm <patrick@lunatiki.de> | 2011-01-09 17:18:07 +0000 |
---|---|---|
committer | Patrick Grimm <patrick@lunatiki.de> | 2011-01-09 17:18:07 +0000 |
commit | 3010388ce937e56bf08380a5ffa118f61d148165 (patch) | |
tree | 1992295ef387dc6188e62cdabf066ab2f057be00 /applications/luci-ffwizard/root | |
parent | ea7a4bee1803813ea5fd76162c9ae9d3ac4671c8 (diff) |
applications/luci-ffwizard: initial
Diffstat (limited to 'applications/luci-ffwizard/root')
-rw-r--r-- | applications/luci-ffwizard/root/etc/uci-defaults/device-defaults | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/applications/luci-ffwizard/root/etc/uci-defaults/device-defaults b/applications/luci-ffwizard/root/etc/uci-defaults/device-defaults new file mode 100644 index 0000000000..d9ef3d9add --- /dev/null +++ b/applications/luci-ffwizard/root/etc/uci-defaults/device-defaults @@ -0,0 +1,80 @@ +#!/bin/sh + +set_default_config() +{ + local cfg="$1" + config_get type "$cfg" "type" + case $type in + atheros) + uci set freifunk.wifi_device.channel=1 + uci set freifunk.wifi_device.diversity=0 + uci set freifunk.wifi_device.txantenna=1 + uci set freifunk.wifi_device.rxantenna=1 + uci set freifunk.wifi_device.disabled=0 + uci set freifunk.wifi_device.txpower="" + uci set freifunk.wifi_device.country=276 + uci set freifunk.wifi_device.regdomain="0x37" + uci set freifunk.wifi_device.outdoor="1" + uci set freifunk.wifi_device.hwmode=11g + uci set freifunk.wifi_device.distance=1000 + uci set freifunk.wifi_iface=defaults + uci set freifunk.wifi_iface.mode=adhoc + uci set freifunk.wifi_iface.bssid="02:CA:FF:EE:BA:BE" + uci set freifunk.wifi_iface.sw_merge=1 + uci set freifunk.wifi_iface.mcast_rate=5500 + uci set freifunk.wifi_iface.probereq=1 + uci commit freifunk + ;; + mac80211) + uci set freifunk.wifi_device.channel=1 + uci set freifunk.wifi_device.diversity="" + uci set freifunk.wifi_device.disabled=0 + uci set freifunk.wifi_device.txpower="" + uci set freifunk.wifi_device.country=DE + uci set freifunk.wifi_device.distance=1000 + uci set freifunk.wifi_device.htmode='HT40-' + uci set freifunk.wifi_device.hwmode=11ng + uci set freifunk.wifi_iface=defaults + uci set freifunk.wifi_iface.mode=adhoc + uci set freifunk.wifi_iface.bssid="02:CA:FF:EE:BA:BE" + uci set freifunk.wifi_iface.sw_merge="" + uci commit freifunk + ;; + broadcom) + uci set freifunk.wifi_device.channel=1 + uci set freifunk.wifi_device.diversity="" + uci set freifunk.wifi_device.disabled=0 + uci set freifunk.wifi_device.txpower="" + uci set freifunk.wifi_device.country=DE + uci set freifunk.wifi_device.txantenna=0 + uci set freifunk.wifi_device.rxantenna=0 + uci set freifunk.wifi_device.hwmode=11g + uci set freifunk.wifi_device.distance=1000 + uci set freifunk.wifi_iface=defaults + uci set freifunk.wifi_iface.encryption=none + uci set freifunk.wifi_iface.mode=adhoc + uci set freifunk.wifi_iface.bssid="02:CA:FF:EE:BA:BE" + uci set freifunk.wifi_iface.sw_merge="" + uci commit freifunk + ;; + esac +} + + + +( +while true ; do + sleep 30 + wifie=0 + + config_load wireless && wifie=1 + + if [ $wifie -eq 1 ] ; then + config_foreach set_default_config wifi-device + + uci set freifunk.interface.dns="88.198.178.18 141.54.1.1 212.204.49.83 8.8.8.8 8.8.4.4" + uci commit freifunk + exit 0 + fi +done +) >/dev/null & |