base-files: use "ports" array in board.json network for bridges
Bridge aggregates multiple ports so use a more accurate name ("ports")
and format (array) for storing them in board.json.
Example:
"network": {
	"lan": {
		"ports": [
			"lan1",
			"lan2",
			"lan3",
			"lan4"
		],
		"protocol": "static"
	},
	"wan": {
		"ifname": "wan",
		"protocol": "dhcp"
	}
}
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
			
			
This commit is contained in:
		| @@ -39,7 +39,13 @@ ucidef_set_interface() { | ||||
|  | ||||
| 		[ -n "$opt" -a -n "$val" ] || break | ||||
|  | ||||
| 		json_add_string "$opt" "$val" | ||||
| 		[ "$opt" = "ifname" -a "$val" != "${val/ //}" ] && { | ||||
| 			json_select_array "ports" | ||||
| 			for e in $val; do json_add_string "" "$e"; done | ||||
| 			json_close_array | ||||
| 		} || { | ||||
| 			json_add_string "$opt" "$val" | ||||
| 		} | ||||
| 	done | ||||
|  | ||||
| 	if ! json_is_a protocol string; then | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Rafał Miłecki
					Rafał Miłecki