[PATCH v2 1/1] - fixed BOARD value for PicoStation and NanoStation

Steffen Pankratz kratz00 at gmx.de
Do Dez 10 17:40:14 CET 2015


Signed-off-by: Steffen Pankratz <kratz00 at gmx.de>
---
 .../root_file_system/etc/network.nanostation-m     | 31 ----------------------
 .../root_file_system/etc/network.ubnt-nano-m       | 31 ++++++++++++++++++++++
 bsp/default/root_file_system/etc/rc.local.tpl      |  5 ++++
 3 files changed, 36 insertions(+), 31 deletions(-)
 delete mode 100644 bsp/ar71xx/root_file_system/etc/network.nanostation-m
 create mode 100644 bsp/ar71xx/root_file_system/etc/network.ubnt-nano-m

diff --git a/bsp/ar71xx/root_file_system/etc/network.nanostation-m b/bsp/ar71xx/root_file_system/etc/network.nanostation-m
deleted file mode 100644
index 1e9223f..0000000
--- a/bsp/ar71xx/root_file_system/etc/network.nanostation-m
+++ /dev/null
@@ -1,31 +0,0 @@
-WANDEV=eth0
-SWITCHDEV=eth0
-CLIENT_PORTS=""
-WAN_PORTS=""
-BATMAN_PORTS=""
-
-. /etc/network.mode
-
-CLIENTIF="w2ap"
-ETHMESHMAC=
-ROUTERMAC=w2mesh
-
-uci set network.$SWITCHDEV=interface
-uci set network.$SWITCHDEV.ifname=$SWITCHDEV
-uci set network.mesh.ifname="bat0"
-
-if [ "$ETHMODE" = "WAN" ] ; then
-  ## Activate for WAN:
-  echo "net.ipv6.conf.$WANDEV.accept_ra_defrtr = 1" >> /etc/sysctl.conf
-  echo "net.ipv6.conf.$WANDEV.accept_ra_pinfo = 1" >> /etc/sysctl.conf
-  echo "net.ipv6.conf.$WANDEV.autoconf = 1" >> /etc/sysctl.conf
-  echo "net.ipv6.conf.$WANDEV.accept_ra_rtr_pref = 1" >> /etc/sysctl.conf
-  uci set network.wan.ifname=$WANDEV
-elif [ "$ETHMODE" = "CLIENT" ] ; then
-  ## Activate Client:
-  CLIENTIF="w2ap eth0"
-  uci set network.mesh.ifname="bat0 $SWITCHDEV"
-else
-  ## Activate BATMAN:
-  uci set network.ethmesh.ifname="$SWITCHDEV"
-fi
diff --git a/bsp/ar71xx/root_file_system/etc/network.ubnt-nano-m b/bsp/ar71xx/root_file_system/etc/network.ubnt-nano-m
new file mode 100644
index 0000000..1e9223f
--- /dev/null
+++ b/bsp/ar71xx/root_file_system/etc/network.ubnt-nano-m
@@ -0,0 +1,31 @@
+WANDEV=eth0
+SWITCHDEV=eth0
+CLIENT_PORTS=""
+WAN_PORTS=""
+BATMAN_PORTS=""
+
+. /etc/network.mode
+
+CLIENTIF="w2ap"
+ETHMESHMAC=
+ROUTERMAC=w2mesh
+
+uci set network.$SWITCHDEV=interface
+uci set network.$SWITCHDEV.ifname=$SWITCHDEV
+uci set network.mesh.ifname="bat0"
+
+if [ "$ETHMODE" = "WAN" ] ; then
+  ## Activate for WAN:
+  echo "net.ipv6.conf.$WANDEV.accept_ra_defrtr = 1" >> /etc/sysctl.conf
+  echo "net.ipv6.conf.$WANDEV.accept_ra_pinfo = 1" >> /etc/sysctl.conf
+  echo "net.ipv6.conf.$WANDEV.autoconf = 1" >> /etc/sysctl.conf
+  echo "net.ipv6.conf.$WANDEV.accept_ra_rtr_pref = 1" >> /etc/sysctl.conf
+  uci set network.wan.ifname=$WANDEV
+elif [ "$ETHMODE" = "CLIENT" ] ; then
+  ## Activate Client:
+  CLIENTIF="w2ap eth0"
+  uci set network.mesh.ifname="bat0 $SWITCHDEV"
+else
+  ## Activate BATMAN:
+  uci set network.ethmesh.ifname="$SWITCHDEV"
+fi
diff --git a/bsp/default/root_file_system/etc/rc.local.tpl b/bsp/default/root_file_system/etc/rc.local.tpl
index d4ca6e4..b115fc1 100755
--- a/bsp/default/root_file_system/etc/rc.local.tpl
+++ b/bsp/default/root_file_system/etc/rc.local.tpl
@@ -3,6 +3,7 @@
 # the system init finished. By default this file does nothing.
 
 BOARD=$(cat /var/sysinfo/board_name)
+
 case "$BOARD" in
     tl-wr1043nd)
         BOARD=tl-wr1043nd-v1
@@ -19,7 +20,11 @@ case "$BOARD" in
     tl-wr841n-v9)
         grep "v10" /var/sysinfo/model && BOARD=tl-wr841n-v10
         ;;
+    nanostation-m)
+        BOARD=ubnt-nano-m
+        ;;
 esac
+
 if ! uci get board.model.name; then
     uci set board.model.name=$BOARD
 fi
-- 
2.6.3




Mehr Informationen über die Mailingliste franken-dev