From 156efc845a14e68668d77f7078fb2943e892e93c Mon Sep 17 00:00:00 2001 From: floh1111 Date: Sun, 11 Dec 2011 02:05:56 +0000 Subject: [PATCH] Copy config of wr1043nd for wr741nd --- .../wr741nd/etc/config/batman-adv | 11 ++++++ root_file_system/wr741nd/etc/config/network | 32 +++++++++++++++++ root_file_system/wr741nd/etc/config/system | 11 ++++++ root_file_system/wr741nd/etc/config/wireless | 25 +++++++++++++ root_file_system/wr741nd/etc/crontabs/root | 25 +++++++++++++ root_file_system/wr741nd/etc/rc.local | 36 +++++++++++++++++++ 6 files changed, 140 insertions(+) create mode 100644 root_file_system/wr741nd/etc/config/batman-adv create mode 100644 root_file_system/wr741nd/etc/config/network create mode 100644 root_file_system/wr741nd/etc/config/system create mode 100644 root_file_system/wr741nd/etc/config/wireless create mode 100644 root_file_system/wr741nd/etc/crontabs/root create mode 100755 root_file_system/wr741nd/etc/rc.local diff --git a/root_file_system/wr741nd/etc/config/batman-adv b/root_file_system/wr741nd/etc/config/batman-adv new file mode 100644 index 0000000..aa53b47 --- /dev/null +++ b/root_file_system/wr741nd/etc/config/batman-adv @@ -0,0 +1,11 @@ +config 'mesh' 'bat0' + option 'interfaces' 'wlan1' + option 'aggregated_ogms' + option 'bonding' + option 'fragmentation' + option 'gw_bandwidth' + option 'gw_mode' + option 'gw_sel_class' + option 'log_level' + option 'orig_interval' + option 'vis_mode' \ No newline at end of file diff --git a/root_file_system/wr741nd/etc/config/network b/root_file_system/wr741nd/etc/config/network new file mode 100644 index 0000000..2e38665 --- /dev/null +++ b/root_file_system/wr741nd/etc/config/network @@ -0,0 +1,32 @@ +config 'interface' 'loopback' + option 'ifname' 'lo' + option 'proto' 'static' + option 'ipaddr' '127.0.0.1' + option 'netmask' '255.0.0.0' + +config 'interface' 'wlanmesch' + option 'ifname' 'wlan1' + option 'mtu' '1527' + +config 'interface' 'mesh' + option 'type' 'bridge' + option 'ifname' 'eth0.1 wlan0 bat0 tap0' + +config 'interface' 'wan' + option 'ifname' 'eth0.2' + option 'proto' 'dhcp' + +config 'switch' + option 'name' 'rtl8366rb' + option 'reset' '1' + option 'enable_vlan' '1' + +config 'switch_vlan' + option 'device' 'rtl8366rb' + option 'vlan' '1' + option 'ports' '1 2 3 4 5t' + +config 'switch_vlan' + option 'device' 'rtl8366rb' + option 'vlan' '2' + option 'ports' '0 5t' diff --git a/root_file_system/wr741nd/etc/config/system b/root_file_system/wr741nd/etc/config/system new file mode 100644 index 0000000..8697558 --- /dev/null +++ b/root_file_system/wr741nd/etc/config/system @@ -0,0 +1,11 @@ +config 'system' + option 'hostname' 'OpenWrt' + option 'timezone' 'CET-1CEST,M3.5.0,M10.5.0/3' + +config 'rdate' + option 'interface' 'wan' + +config 'led' 'wlan_led' + option 'name' 'WLAN' + option 'sysfs' 'tl-wr1043nd:green:wlan' + option 'trigger' 'phy0rx' \ No newline at end of file diff --git a/root_file_system/wr741nd/etc/config/wireless b/root_file_system/wr741nd/etc/config/wireless new file mode 100644 index 0000000..a8f2879 --- /dev/null +++ b/root_file_system/wr741nd/etc/config/wireless @@ -0,0 +1,25 @@ +config wifi-device radio0 + option type mac80211 + option channel 6 + option macaddr d8:5d:4c:9c:2d:a6 + option hwmode 11ng + option htmode HT20 + list ht_capab SHORT-GI-40 + list ht_capab DSSS_CCK-40 + # REMOVE THIS LINE TO ENABLE WIFI: + option disabled 0 + +config wifi-iface + option device radio0 + option network wlan + option mode adhoc + option bssid '02:CA:FF:EE:BA:BE' + option ssid 'batman.oldenburg.freifunk.net' + option mcast_rate 6000 +# option bintval 1000 + +config wifi-iface + option device radio0 + option network wlan + option mode ap + option ssid 'oldenburg.freifunk.net' \ No newline at end of file diff --git a/root_file_system/wr741nd/etc/crontabs/root b/root_file_system/wr741nd/etc/crontabs/root new file mode 100644 index 0000000..05045a2 --- /dev/null +++ b/root_file_system/wr741nd/etc/crontabs/root @@ -0,0 +1,25 @@ +*/5 * * * * killall klogd +*/5 * * * * killall syslogd +*/5 * * * * killall logger + +*/5 * * * * sh /etc/tincstart.sh +*/5 * * * * sh /etc/nodewatcher.sh +*/5 * * * * sh /etc/configurator.sh +0 * * * * sh /etc/configurator.sh sync_hostname + + +15 01 * * * rdate -s time.fu-berlin.de > /dev/null + +#Enable zapp script if you are running a gateway +#*/1 * * * * /etc/init.d/zapp + +*/5 * * * * killall -HUP dnsmasq +#* * * * * /usr/sbin/ff_olsr_test_gw +#*/5 * * * * /usr/sbin/ff_olsr_watchdog +#0 */4 * * * /usr/sbin/ff_rdate +#17 * * * * /usr/sbin/ff_mapupdate + +#Fix only for WR1043ND because wlan0 is not added after bootup +*/5 * * * * brctl addif br-mesh wlan0 +#Fix only for WR1043ND because mtu of wlan1 is not set bootup +*/5 * * * * ifconfig wlan1 mtu 1527 diff --git a/root_file_system/wr741nd/etc/rc.local b/root_file_system/wr741nd/etc/rc.local new file mode 100755 index 0000000..9c4b4cc --- /dev/null +++ b/root_file_system/wr741nd/etc/rc.local @@ -0,0 +1,36 @@ +# Put your custom commands here that should be executed once +# the system init finished. By default this file does nothing. + +#Set Mac-Addr of wr1043nd wifi interface if not right +HARDWARE_MACADDR=`ifconfig -a wlan0 | grep 'HWaddr' | awk '{ print $5}'` +SOFTWARE_MACADDR=`uci get wireless.@wifi-device[0].macaddr` + +if [[ "$HARDWARE_MACADDR" != "$SOFTWARE_MACADDR" ]]; then + uci set wireless.@wifi-device[0].macaddr=$HARDWARE_MACADDR + uci commit + reboot +fi + +ifconfig br-mesh down +ifconfig br-mesh up + +ifdown lan +ifup lan + +rdate -s time.fu-berlin.de + +chown root.root /etc/crontabs/root +/etc/init.d/cron stop +/etc/init.d/cron start + +sh /etc/firewall.user + +/etc/init.d/qos disable +/etc/init.d/qos stop + +#busybox-httpd for crawldata +httpd -h /tmp/ + +sh /etc/configurator.sh + +exit 0