Changeset 47671


Ignore:
Timestamp:
2015-11-30T11:17:05+01:00 (2 years ago)
Author:
jow
Message:

base-files: uci-defaults-new: add board id and name helpers

Add ucidef_set_board_id() and ucidef_set_model_name() procedures to store
model information in the board.json file.

Signed-off-by: Jo-Philipp Wich <jow@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/package/base-files/files/lib/functions/uci-defaults-new.sh

    r47660 r47671  
    3636        json_add_string ifname "${iface%%.*}" 
    3737        [ "$iface" = "${iface%%.*}" ] || json_add_boolean create_vlan 1 
     38        json_select .. 
     39} 
     40 
     41ucidef_set_board_id() { 
     42        json_select_object model 
     43        json_add_string id "$1" 
     44        json_select .. 
     45} 
     46 
     47ucidef_set_model_name() { 
     48        json_select_object model 
     49        json_add_string name "$1" 
    3850        json_select .. 
    3951} 
Note: See TracChangeset for help on using the changeset viewer.