Opened 3 years ago

Closed 3 years ago

#17633 closed defect (fixed)

/etc/board.d/02_network broken

Reported by: lsoltero Owned by: developers
Priority: high Milestone: Chaos Calmer 15.05
Component: base system Version: Trunk
Keywords: 02_network broken Cc:


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:

  1. Added a new board and modified the script
  2. confirmed that the board is being identified correctly by looking at variables in /tmp/sysinfo
  3. 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"
+ ;;


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/ b/target/linux/ramips/base-files/lib/
index bb42ace..4db3a4a 100755
--- a/target/linux/ramips/base-files/lib/
+++ b/target/linux/ramips/base-files/lib/
@@ -166,6 +166,9 @@ ramips_board_detect() {

*"Kingston MLW221")


+ *"MT7620a GEMINI")
+ name="gemini7620a"
+ ;;

*"Planex MZK-750DHP")


here is proof that the board is being detected correctly.
root@OpenWrt:/etc/config# cat /tmp/sysinfo/*
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.


Attachments (1)

board.out (51.7 KB) - added by lsoltero 3 years ago.
output for sh -x /etc/board.d/02_network

Download all attachments as: .zip

Change History (3)

Changed 3 years ago by lsoltero

output for sh -x /etc/board.d/02_network

comment:1 Changed 3 years ago by lsoltero

the following patch fixes the problem. It seems that the jhsn command does not (and has never) support the '-i' option. It seems that previous versions of the network script did not pass on arguments to jhsn. Now they do. Anyway... the fix for this issue is simple. Just need to remove the '-i' option in the call. the following patch fixes the problem.

diff --git a/package/base-files/files/lib/functions/ b/package/base-files/files/lib/functions/
index 528835b..0f5a013 100755
--- a/package/base-files/files/lib/functions/
+++ b/package/base-files/files/lib/functions/
@@ -297,6 +297,6 @@ board_config_update() {
 board_config_flush() {
-       json_dump -i > /tmp/.board.json
+       json_dump  > /tmp/.board.json
        mv /tmp/.board.json ${CFG}

Last edited 3 years ago by lsoltero (previous) (diff)

comment:2 Changed 3 years ago by jow

  • Resolution set to fixed
  • Status changed from new to closed

The jshn "-i" flag has been implemented with;a=commitdiff;h=dffbc09baf71b294185a36048166d00066d433b5 and the update was pulled into trunk with r42230

Add Comment

Modify Ticket

as closed .
The resolution will be deleted. Next status will be 'reopened'.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.