System Administration Commands             nwamcfg(1M)

NAME

SYNOPSIS

DESCRIPTION

Properties

NCU Properties

Properties common to all NCUs
Properties of IP NCUs
Properties common to all LINK NCUs

Location Properties

ENM Properties

Known WLAN Properties

Condition Expressions

Locations and ENMs can be activated based on a set of user-specified conditions. The following table summarizes the syntax of those condition expressions.
Object Type Object Condition
NCU|ENM|Location name is/is-not active
Object Type Condition Object
WLAN/ESSID is/is-not/contains/does-not-contain name string
BSSID is/is-not bssid string
ip-address is/is-not IPv4 or IPv6 address
ip-address is-in-range/is-not-in-range IPv4 or IPv6 address plus netmask/prefixlen
advertised-domain is/is-not/contains/does-not-contain name string
system-domain is/is-not/contains/does-not-contain name string

OPTIONS

SUBCOMMANDS

The following subcommands are supported.

cancel

End the current profile specification without committing the current changes to persistent storage, and pop up to the next higher scope.

clear <prop-name>

Clear the value for the specified property.

commit

Commit the current profile to persistent storage. Since a configuration must be correct to be committed, this operation automatically performs a verify on the object as well. The commit operation is attempted automatically upon leaving the current scope (with either the 'end' or 'exit' subcommand).

Note that in non-interactive mode a commit is not required, as the commit is implicit for any subcommand which changes a value.

create [ -t <template> ] <object-type> [ <class> ] <object-name>

Create an in-memory profile of the specified type and name. The -t <template> option specifies that the new object should be identical to <template>, where <template> is the name of an existing object of the same type. If the -t option is not used, the new object is created with default values. For NCPs, only a "User" NCP can be created.

destroy { -a | <object-type> [ <class> ] <object-name> }

Remove all or the specified profile from memory and persistent storage. This action is immediate; it does not need to be committed. A destroyed object cannot be reverted.

end

End the current profile specification, and pop up to the next higher scope. The current object is verified and committed before ending; if either the verify or commit fails, an appropriate error message is issued and the user is given the opportunity to end without committing the current changes, or to remain in the current scope and continue editing.

exit

Exit the nwamcfg session. The current profile is verified and committed before ending; if either fails, an appropriate error message is issued and the user is given the opportunity to exit without committing the current changes, or to remain in the current scope and continue editing.

export [ -d ] [ -f <output-file> ] [ <object-type> [ <class> ] <object-name> ]

Print the current configuration at the current or specified scope to standard out, or to a file specified with the -f option. The -d option generates a "destroy -a" as the first line of output. This subcommand produces output in a form suitable for use in a command file. The Automatic NCP and the Automatic and NoNet locations cannot be exported.

get <prop-name>

Get the current (in-memory) value of the specified property.

help [ <subcommand> ]

Display general help or help about a specific subcommand.

list [ <object-type> [ <class> ] <object-name> ]

List all profiles, property-value pairs and resources that exist at the current or specified scope.

revert

Delete any current changes to the current profile and revert to the values from persistent storage.

select <object-type> [ <class> ] <object-name>

Select one of the profiles available at the current scope level and jump down into that object's scope. The selected object will be loaded into memory from persistent storage.

set <prop-name>=<value1>[,<value2>...]

Set the current (in-memory) value of the specified property. If performed in non-interactive mode, the change is also committed to persistent storage.

The delimiter for values of multi-valued properties is "," (comma). If any of the individual values in such a property contains a comma, it must be escaped (i.e., written as "\,"). Commas within properties that can only have a single value are not interpreted as delimiters, and need not be escaped.

verify

Verify that the current in-memory object has a valid configuration.

walkprop

Walk each property associated with the current profile. For each property, the name and current value are displayed, and a prompt is given to allow the user to change the current value.

The delimiter for values of multi-valued properties is "," (comma). If any of the individual values in such a property contains a comma, it must be escaped (i.e., written as "\,"). Commas within properties that can only have a single value are not interpreted as delimiters, and need not be escaped.

This subcommand is only meaningful in interactive mode.

SEE ALSO

EXAMPLES

Example 1: Set an NCU property from the command line (in non-interactive mode)
# nwamcfg "select ncp User; select ncu link net1; set mtu=1492"
#
Example 2: List all top-level profiles from the command line
# nwamcfg list
NCPs:
        Automatic
        User
Locations:
        Automatic
        NoNet
        home
        office
ENMs:
        myenm
        enmtest
WLANs:
        sunwifi
        coffeeshop
        linksys
#
Example 3: Destroy a Location profile from the command line
# nwamcfg destroy loc home
Destroyed loc 'home'
#
Example 4: Interactively create an NCU profile.
# nwamcfg
nwamcfg> select ncp User
nwamcfg:ncp:User> create ncu ip net1
Created ncu 'net1'.  Walking properties ...
        ip-version (all) [ipv4|ipv6|all]> ipv4
        ipv4-addr-src (dhcp) [static|dhcp]> static
        ipv4-static-addr ()> 168.1.2.3
nwamcfg:ncp:User:ncu:net1> list
NCU:IP:net1
        type:             ip
        class:            ip
        parent-ncp:       "User"
        ip version:       ipv4
        ipv4-addr-src:    static
        ipv4-static-addr: 168.1.2.3
nwamcfg:ncp:User:ncu:net1> commit
Committed changes
nwamcfg:ncp:User:ncu:net1> end
nwamcfg:ncp:User> exit
#
Example 5: Select an existing enm, display its contents,
           and change a property value
# nwamcfg
nwamcfg>select enm myenm
nwamcfg:enm:myenm>list
ENM:myenm
        activation-mode manual
        enabled         true
        start           "/usr/local/bin/myenm start"
        stop            "/usr/local/bin/myenm stop"
nwamcfg:enm:myenm>set stop="/bin/alt_stop"
nwamcfg:enm:myenm>list
ENM:myenm
        activation-mode manual
        enabled         true
        start           "/usr/local/bin/myenm start"
        stop            "/bin/alt_stop"
nwamcfg:enm:myenm>exit
Committed changes
#