The only way I found which might help you a little bit is to use
svccfg(1M) instead of svcprop(1) when listing the properties and their
values. I.e.:

$ svccfg -s network/dns/multicast:default listprop | grep nss_mdns_config
nss_mdns_config                      application
nss_mdns_config/domain               astring  "local" "b.e.f.ip6.arpa" 
"a.e.f.ip6.arpa" "9.e.f.ip6.arpa" "8.e.f.ip6.arpa" "254.169.in-addr.arpa"
nss_mdns_config/stability            astring  Unstable
nss_mdns_config/value_authorization  astring  solaris.smf.value.mdns

versus

$ svcprop network/dns/multicast:default | grep nss_mdns_config
nss_mdns_config/domain astring local b.e.f.ip6.arpa a.e.f.ip6.arpa 
9.e.f.ip6.arpa 8.e.f.ip6.arpa 254.169.in-addr.arpa
nss_mdns_config/stability astring Unstable
nss_mdns_config/value_authorization astring solaris.smf.value.mdns

Please note the double-quotes in the former output, which might help
your script determine whether you're looking at a single string value
(possibly with spaces) or at multiple values.

Maybe someone more familiar with SMF could also give you guidance
on how "safe" it is to depend on outputs from these commands in such
a situations.

Tomas

Roland Mainz wrote:
> Roland Mainz wrote:
>> Tomas Heran wrote:
>>> Roland Mainz wrote:
>>>> Do SMF propperties support arrays ? I'm currently looking at CR #6218143
>>>> ("Xserver doesn't parse SMF server_args correctly") and IMO one of the
>>>> better solutions would be to have an array of arguments (similar like
>>>> argv) to handle values with { <space>, <tab>, <newline> } (e.g. the
>>>> default content of the IFS variable (see sh(1))) correctly...
>>> yes, arrays of values are supported. Please have a look here (property
>>> 'domain') for an example xml manifest file:
>>>
>>> http://src.opensolaris.org./source/xref/onnv/onnv-gate/usr/src/cmd/cmd-inet/usr.lib/mdnsd/multicast.xml#111
>> Thanks! :-)
> 
> How can I figure out whether a value an "astring" or an "astring_list" ?
> 
> http://src.opensolaris.org./source/xref/onnv/onnv-gate/usr/src/cmd/cmd-inet/usr.lib/mdnsd/multicast.xml#111
> defines the "domain" property like this:
> -- snip --
> 111 <property name='domain' type='astring'>
> 112   <astring_list>
> 113           <value_node value='local'/>
> 114           <value_node value='254.169.in-addr.arpa'/>
> 115           <value_node value='8.e.f.ip6.arpa'/>
> 116           <value_node value='9.e.f.ip6.arpa'/>
> 117           <value_node value='a.e.f.ip6.arpa'/>
> 118           <value_node value='b.e.f.ip6.arpa'/>
> 119   </astring_list>
> 120 </property>
> -- snip --
> 
> However when I "crawl" the SMF properly tree using my "svcproptree1.ksh"
> script
> (http://svn.genunix.org/repos/on/branches/ksh93/gisburn/scripts/svcproptree1.ksh
> ; it may require the ksh93-integration update1 version of ksh93) I am
> getting the following output:
> -- snip --
> $ svcproptree1.ksh "network/dns/multicast:default" list | grep
> "mdns.*domain"
> #loading completed.
> #parsing completed.
> svc.proptree[network/dns/multicast:default/].properties[nss_mdns_config/domain].datatype=astring
> svc.proptree[network/dns/multicast:default/].properties[nss_mdns_config/domain].value='local
> b.e.f.ip6.arpa a.e.f.ip6.arpa 9.e.f.ip6.arpa 8.e.f.ip6.arpa
> 254.169.in-addr.arpa'
> #done.
> -- snip --
> ... which means the application doesn't see whether the value is a
> normal "astring" or an array of one or multiple "astring" values...
> 
> ----
> 
> Bye,
> Roland
> 

Reply via email to