Managing System Services in Oracle® Solaris 11.2

Exit Print View

Updated: July 2014
 
 

Invoking a Property Editor

Invoking the svccfg command as shown in the following example opens an editor on the properties of the selected entity. This form of the svccfg command can be very fast and convenient for modifying several property values. For the editprop subcommand, you must specify an entity with the -s option.

$ svccfg -s pkg/server:s11 editprop

A file of setprop commands for the current values of each property of the specified entity opens in the editor specified by the VISUAL environment variable. If VISUAL is not defined, the editor specified by EDITOR is opened. If neither VISUAL nor EDITOR is defined, the property file is opened in vi.

Each line of the file is preceded by a comment character. To change the value of a property in the svccfg editing configuration, remove the comment character, change the value, and save the file. To change the value of a property in the running snapshot, remove the comment character from the last line of the file, which is the refresh subcommand.

The following listing shows a partial example of a file created by the editprop subcommand:

##
## Change property values by removing the leading '#' from the
## appropriate lines and editing the values. svccfg subcommands
## such as delprop can also be added to the script.
##
## Property group "pkg"
## The following properties are defined in the selected instance
## (svc:/application/pkg/server:s11)

# setprop pkg/port = count: 81
# setprop pkg/inst_root = astring: /export/ipsrepos/Solaris11

## The following properties inherit from the parent service
## (svc:/application/pkg/server)

# ...

## Property group "pkg_bui"

# ...

## Property group "pkg_secure"

# ...

## Uncomment to apply these changes to this instance.
# refresh

As the instructions in the file state, you can add subcommands other than setprop. For example, you could add a delprop command. Some property groups, such as framework and dependency, are not displayed by default. Specify editprop -a to show all properties.

The uncommented commands in this temporary file are executed when you save and quit the editing session.