#17633: /etc/board.d/02_network broken
-------------------------------+----------------------------------
 Reporter:  lsoltero           |      Owner:  developers
     Type:  defect             |     Status:  new
 Priority:  high               |  Milestone:  Chaos Calmer (trunk)
Component:  base system        |    Version:  Trunk
 Keywords:  02_network broken  |
-------------------------------+----------------------------------
 Short description:  in CC r42229 the 02_network script is not executing to
 completion failing to generate /etc/config/network on new OpenWRT
 installations.

 Long description:
 a. Added a new board and modified the script
 b. confirmed that the board is being identified correctly by looking at
 variables in /tmp/sysinfo
 c. noticed an error when running the script in sh -x mode... here is the
 error.
 + jshn -i -w
 jshn: invalid option -- i
 Usage: jshn [-n] -r <message>|-w


 here is the patch to 02_network to add our board.
 diff --git a/target/linux/ramips/base-files/etc/board.d/02_network
 b/target/linux/ramips/base-files/etc/board.d/02_network
 index e027b3b..4ab6f44 100755
 --- a/target/linux/ramips/base-files/etc/board.d/02_network
 +++ b/target/linux/ramips/base-files/etc/board.d/02_network
 @@ -70,6 +70,13 @@ ramips_setup_interfaces()
                 ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
                 ;;

 +        gemini7620a)
 +                ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
 +                ucidef_add_switch "switch0" "1" "1"
 +                ucidef_add_switch_vlan "switch0" "1" "1 2 3 4 6t"
 +                ucidef_add_switch_vlan "switch0" "2" "0 6t"
 +                ;;
 +
         awapn2403)
                 ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
                 ucidef_add_switch "switch0" "1" "1"

 here is the patch to ramips

 diff --git a/target/linux/ramips/base-files/lib/ramips.sh
 b/target/linux/ramips/base-files/lib/ramips.sh
 index bb42ace..4db3a4a 100755
 --- a/target/linux/ramips/base-files/lib/ramips.sh
 +++ b/target/linux/ramips/base-files/lib/ramips.sh
 @@ -166,6 +166,9 @@ ramips_board_detect() {
         *"Kingston MLW221")
                 name="mlw221"
                 ;;
 +       *"MT7620a GEMINI")
 +                name="gemini7620a"
 +                ;;
         *"Planex MZK-750DHP")
                 name="mzk-750dhp"
                 ;;

 here is proof that the board is being detected correctly.
 root@OpenWrt:/etc/config# cat /tmp/sysinfo/*
 gemini7620a
 Ralink MT7620a GEMINI

 attached you will find the complete output of
 sh -x /etc/board.d/02_network
 showing that the board was detected and the appropriate routines called...

 yet no /etc/config/network appears after the script runs.

 --luis

--
Ticket URL: <https://dev.openwrt.org/ticket/17633>
OpenWrt <http://openwrt.org>
Opensource Wireless Router Technology
_______________________________________________
openwrt-tickets mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-tickets

Reply via email to