_______________________________________________________________________________________________________
_____________________________________________________________________________________________________
© Virtual Access 2017
GW7304 Series User Manual
Issue: 1.9
Page 67 of 336
10.6
Configuration file syntax
The configuration files consist of sections – or packages - that contain one or more
config statements. These optional statements define actual values.
Below is an example of a simple configuration file.
package 'example'
config 'example' 'test'
option 'string' 'some value'
option 'boolean' '1'
list 'collection' 'first item'
list 'collection' 'second item'
The config 'example' 'test' statement defines the start of a section with the type example
and the name test.
Command
Target
Description
export
[<config>]
Exports the configuration in a machine
readable format. It is used internally to
evaluate configuration files as shell scripts.
import
[<config>]
Imports configuration files in UCI syntax.
add
<config> <section-type>
Adds an anonymous section of type-section
type to the given configuration.
add_list
<config>.<section>.<option>=<string>
Adds the given string to an existing list
option.
show
[<config>[.<section>[.<option>]]]
Shows the given option, section or
configuration in compressed notation.
get
<config>.<section>[.<option>]
Gets the value of the given option or the type
of the given section.
Set
<config>.<section>[.<option>]=<value>
Sets the value of the given option, or adds a
new section with the type set to the given
value.
delete
<config>[.<section[.<option>]]
Deletes the given section or option.
Table 1: Common commands, target and their descriptions
10.7
Managing configurations
10.7.1
Managing sets of configuration files using directory manipulation
Configurations can also be managed using directory manipulation.
To remove the contents of the current folder, enter:
root@VA_router:/etc/config1# rm –f *
Warning: the above command makes irreversible changes.