flags Specify P for the value of flags to store the property group and any

Flags specify p for the value of flags to store the

This preview shows page 71 - 74 out of 122 pages.

flags Specify P for the value of flags to store the property group and any added properties as non-persistent. If P is specified, this property group and contained properties will be automatically removed on reboot, The value P is an alias for SCF_PG_FLAG_NONPERSISTENT . See the scf_service_add_pg (3SCF) man page. $ svccfg -s svc:/site/my-svc addpg config application $ svccfg -s my-svc listprop config config application $ svccfg -s my-svc:default listprop config $ In this example, the administrator added the config property group to the parent service, my- svc , but not to the instance, my-svc:default . The listprop command shows that the config property group does not exist in the service instance. EXAMPLE   4-7 Using setprop to Create a New Property Use the setprop subcommand to set a property value as described in “Setting Property Values” on page 66 . If the property group does not already exist in the selected instance or service, the property group is created if the type and flags are found in the template definitions. If the property does not already exist in the selected instance or service, you must specify the property type . $ svccfg -s my-svc:default setprop config/vendor = astring: vendora $ svccfg -s my-svc:default listprop config/vendor config/vendor astring vendora
Image of page 71
Deleting Property Groups, Properties, and Property Values 72 Managing System Services in Oracle Solaris 11.2 • July 2014 EXAMPLE   4-8 Using addpropvalue to Create a New Property Use the addpropvalue subcommand to add a property value as described in “Setting Property Values” on page 66 . If the property group does not already exist in the selected instance or service, the property group is created if the type and flags are found in the template definitions. If the property does not already exist in the selected instance or service, you must specify the property type . $ svccfg -s my-svc:default addpropvalue config/vendor astring: vendorb $ -s my-svc:default addpropvalue config/customer astring: acustomer $ svccfg -s my-svc:default listprop config config application config/vendor astring "vendora" "vendorb" config/customer astring acustomer Deleting Property Groups, Properties, and Property Values The following commands delete property values, properties, and property groups: svccfg setprop Delete all values of a property. svccfg delpropvalue Delete all values of the specified property that match the specified pattern. svccfg delprop Delete a property. svccfg delpg Delete a property group. svccfg delcust Delete administrative customizations. Remember to use the svccfg refresh command or svcadm refresh command to commit configuration changes into the running snapshot. Deleting Administrative Configuration Configuration modifications made by using svccfg commands or libscf calls modify only the admin layer of the service configuration repository. See “Repository Layers” on page 25
Image of page 72
Deleting Property Groups, Properties, and Property Values Chapter 4 • Configuring Services 73 for information about layers. When you delete configuration that is only defined in the admin layer and does not exist in any other layer, that configuration is gone. Commands that display
Image of page 73
Image of page 74

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture