012-freifunk-migrate-network 366 B

123456789101112131415161718
  1. #!/bin/sh
  2. get_main_address() {
  3. case "$board" in
  4. tl-wdr3600|tl-wdr4300)
  5. uci get wireless.radio1.macaddr
  6. ;;
  7. *)
  8. uci get wireless.radio0.macaddr
  9. ;;
  10. esac
  11. }
  12. uci set network.freifunk.proto='none'
  13. uci set network.freifunk.auto='1'
  14. uci set network.freifunk.accept_ra='1'
  15. uci set network.freifunk.macaddr=$(get_main_address)
  16. uci commit network