On Fri, Sep 21, 2007 at 12:33:34AM +0200, Roland Mainz wrote:
> I've attached a small toy/demo script called "svcproptree1.ksh.txt"
> which loads the SMF properly tree into a shell compound variable (a
> compound variable is a single variable which contains several other
> variables (the closest equivalent may be |struct| in C/C++, however
> compound variables go a bit further than that, e.g. some people have
> interpreted the compound variables as "tree variable")), e.g. $ ksh93
> svcproptree1.ksh '*' tree # will result in the tree shown in
> http://opensolaris.pastebin.ca/raw/705213

Very nice!

> Would such a thing somehow usefull for the SMF project, for example
> build a loadable shell function which loads the properties for a
> specific service as part of the method scripts instead of letting all
> scripts do "manual" parsing of the SMF properties (e.g. $ ksh93
> svcproptree1.ksh 'finger' list # loads all properties for the "finger"
> servce into a "tree" variable and the script could then access the
> properly "tm_man_in_fingerd/manpath" via
> manpath="${svc.proptree[network/finger:default/].properties[tm_man_in_fingerd/manpath].value}"
> (the actual variable path could be shortend via "nameref" usage)) ?

I'd like all our method scripts to be ksh93, yes, this kind of thing is
very convincing :)

Reply via email to