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
Properties of IPTUN LINK NCUs

Location Properties

ENM Properties

OPTIONS

SUBCOMMANDS

The following subcommands are supported.

cancel

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

This subcommand is only meaningful in interactive mode.

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).

This subcommand is only meaningful in interactive mode. In non-interactive mode, the commit is implicit in 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 the values specified for that object type in automatic mode.

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.

This subcommand is only meaningful in interactive mode.

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.

This subcommand is only meaningful in interactive mode.

export [ -d ] [ -f <output-file> ]

Print the current configuration to standard out, or to a file specified with the -f option. The -d option generates a "destroy -a" as the first output. This subcommand produces output in a form suitable for use in a command file.

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 property-value pairs 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.

This subcommand is only meaningful in interactive mode.

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

Select one of the profiles available at the current scope level and jump down into that object's profiles 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.

This subcommand is only meaningful in interactive mode.

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 myncp; select ncu link net1; set mtu=1492"
#
Example 2: List all top-level profiles from the command line
# nwamcfg list
NCPs:
        myncp
Locations:
        home
        office
ENMs:
        myenm
        enmtest
#
Example 3: Destroy a Location profile from the command line
# nwamcfg destroy loc home
Destroyed location:home.
#
Example 4: Interactively create an NCU profile.
# nwamcfg
nwamcfg> select ncp myncp
nwamcfg:ncp:myncp> create ncu ip net1
nwamcfg:ncp:myncp:ncu:net1> walkprop
        activation (always) [always|never|manual|prioritized|conditional]> conditional
        condition ()> link:net1
        under (link:net1)>
        ip-version (all) [ipv4|ipv6|all]> ipv4
        ipv4-addr-src (dhcp) [static|dhcp]> static
        ipv4-static-addr ()> 168.1.2.3
nwamcfg:ncp:myncp:ncu:net1> list
NCU:IP:net1
        class:            ip
        parent-ncp:       myncp
        activation:       conditional
        condition:        link:net1
        under:            link:net1
        ip-version:       ipv4
        ipv4-addr-src:    static
        ipv4-static-addr: 168.1.2.3
nwamcfg:ncp:myncp:ncu:net1> commit
nwamcfg:ncp:myncp:ncu:net1> end
nwamcfg:ncp:myncp> 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
        state          disabled
        activation     manual
        condition      ""
        fmri           ""
        start          "/usr/local/bin/start_myenm"
        stop           "/usr/local/bin/stop_myenm"
nwamcfg:enm:myenm>set stop=/bin/alt_stop
nwamcfg:enm:myenm>list
ENM:myenm
        state          disabled
        activation     manual
        condition      ""
        fmri           ""
        start          "/usr/local/bin/start_myenm"
        stop           "/bin/alt_stop"
nwamcfg:enm:myenm>exit
nwamcfg:enm:myenm: committing changes...done
#