在”www/luci2/cbi.js”中定义了一组读写”/etc/config/”目录下UCI配置文件的函数,通过这些函数可以方便地读取,或者修改支持UCI的程序的配置参数。
例如:
“cbi_class.Map = L.ui.AbstractWidget.extend({”
“cbi_class.NamedSection = cbi_class.TypedSection.extend({”
“cbi_class.SingleSection = cbi_class.NamedSection.extend({”
等等;
例如在openwrt上保存wifi参数设置的配置文件为”/etc/config/wireless”
# cat /etc/config/wireless config wifi-device mt7603e option type mt7603e option vendor ralink option band |