If you create a method context in a service manifest (like in
/var/svc/manifest/system/iscsi_target.xml or /var/svc/manifest/system/sar.xml),
svccfg will populate all the properties in the method property group with
a set of defaults.
However, if you use svccfg directly (e.g. svccfg -s smtp:sendmail setprop
start/project = astring: 'myproj'), you could potentially set only the
properties you needed. Unfortunately, the librestart code which gets the
method context doesn't like this and basically refuses to continue on without
a fully populated method context.
We should fix the librestart code to default to something reasonable, and
only error if there are actual problems.
(When this is fixed, we can reconsider whether svccfg could relax its
auto-population of partially defined property groups, but that's not
necessary as part of the same fix.
Work Around
Specify all required properties directly. In this example, we're trying
to have the smtp:sendmail service start in the "sendmail" project.
First, check if the property you're trying to set is already defined for the
service:
# svcprop -p start/project sendmail
If this property is set to a value (like ":default"), do the following
to change the project:
# svccfg -s sendmail setprop start/project = sendmail
# svcadm refresh sendmail; svcadm restart sendmail
If it isn't set, specify all required properties.
# svccfg -s sendmail setprop start/project = astring: sendmail
# svccfg -s sendmail setprop start/user = astring: root
# svccfg -s sendmail setprop start/group = astring: :default
# svccfg -s sendmail setprop start/working_directory = astring: :default
# svccfg -s sendmail setprop start/resource_pool = astring: :default
# svccfg -s sendmail setprop start/supp_groups = astring: :default
# svccfg -s sendmail setprop start/privileges = astring: :default
# svccfg -s sendmail setprop start/limit_privileges = astring: :default
# svccfg -s sendmail setprop start/use_profile = boolean: false
# svcadm refresh sendmail; svcadm restart sendmail