Class for accessing/saving config files in /etc/config. When initialized with a filepath this class will contain a list of OpenWRTConfig objects representing the contents of filepath.
Saves the config file
The standard OpenWRT config file format is like so: config section option <tab>option someoption someoption ... <tab>option someoption someoption ...
Class to store config sections from /etc/config/* files.
>>> config = ConfigFileOpenWRT(filepath='/etc/config/network')
>>> test = config.configs() # test is an OpenWRTConfig object
>>> print test[0]['config']
interface lan
>>> print test[0].config
interface lan
>>> test[0]['config'] = 'rule'
>>> test[0].config = 'rule'
Returns the config file in dependency/validation file format which means... No quotes for 2nd field (option/list_item). No quotes for config (variable, section, or package).