treewide: use only board_name function to get name
[openwrt/openwrt.git] / target / linux / brcm47xx / base-files / etc / board.d / 01_detect
index 91ac16eed74f7df38a535c527c8d793ac34793a0..f1022dc13a744a258cfbb1e7634071f323c87715 100755 (executable)
@@ -124,7 +124,7 @@ detect_by_model() {
        # Netgear WGT634U exception
        if grep -sqE 'mtd0: 000(6|a)0000' /proc/mtd; then
                ucidef_add_switch "switch0" \
-                       "0:wan" "1:lan" "2:lan" "3:lan" "4:lan" "5@eth0"
+                       "0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "5@eth0"
                return
        fi
 
@@ -175,9 +175,9 @@ detect_by_model() {
 }
 
 
-local model="$(sed -ne 's/^machine[ \t]*: //p' /proc/cpuinfo)"
-local boardtype="$(nvram get boardtype)"
-local boardnum="$(nvram get boardnum)"
+model="$(board_name)"
+boardtype="$(nvram get boardtype)"
+boardnum="$(nvram get boardnum)"
 
 board_config_update