Go to main content

Developing System Services in Oracle® Solaris 11.4

Exit Print View

Updated: November 2020

Naming Property Groups and Properties

Property group and property names must match the following expression. Notice the space between the = and the %:

[A-Za-z0-9-._~:/?#[]@!$&'()*+,;= %]+

A property group or property name has the following characteristics:

In an FMRI, the following characters are unreserved and will appear unencoded:


The following characters are reserved and will appear encoded when they are part of an FMRI or fragment of an FMRI. A percent (%) character must be encoded when it is used as part of a property group name or property name. See also Using Reserved Characters.

      :   %3A            !   %21            +   %2B
      /   %2F            $   %24            ,   %2C
      ?   %3F            &   %26            ;   %3B
      #   %23            '   %27            =   %3D
      [   %5B            (   %28      <space>   %20
      ]   %5D            )   %29            %   %25
      @   %40            *   %2A

The following example shows a full FMRI for a property: the FMRI of the service instance, followed by /:properties/, followed by the name of the property.


You can use the -f option of the svcprop command to show the full FMRI of a property.

$ svcprop -fp pkg/port pkg/server:default
svc:/application/pkg/server:default/:properties/pkg/port count 80

Using Reserved Characters

When you use svcbundle, you must encode reserved characters, as shown in the following example:

# svcbundle -s service-name=site/enchars-example \
> -s start-method=true \
> -s instance-property=config:start%3Aend:count:10 \
> -s instance-property=config:students%2Fteachers:count:20 \
> -s instance-property=config:maximum%20%23:count:9 \
> -s instance-property=config:%25%20increase:count:10 > enchars_example.xml

When you edit a manifest or profile directly or use the editprop tool, you do not need to encode reserved characters. The following config property group is from the enchars_example.xml manifest output by the above svcbundle command:

<property_group type="application" name="config">
    <propval type="count" name="start:end" value="10"/>
    <propval type="count" name="students/teachers" value="20"/>
    <propval type="count" name="maximum #" value="9"/>
    <propval type="count" name="% increase" value="10"/>

Reserved characters always appear encoded in an FMRI.

$ svcprop -fp config enchars-example:default
svc:/site/enchars-example:default/:properties/config/%25%20increase count 10
svc:/site/enchars-example:default/:properties/config/maximum%20%23 count 9
svc:/site/enchars-example:default/:properties/config/start%3Aend count 10
svc:/site/enchars-example:default/:properties/config/students%2Fteachers count 20