2007/393 converting /etc/default/{nfs,autofs} to SMF properties

Robert Thurlow robert.thurlow at sun.com
Tue Jul 3 13:55:22 PDT 2007


Glenn Skinner wrote:

> Perhaps I missed something along the way about how SMF properties are
> used in practice.  But why are the properties above all represented as
> astrings when SMF supplies more precise types such as integers and
> booleans that, presumably, are more appropriate for many of them?

The key consumer of these properties is the NFS plugin to libshare,
libshare_nfs.so, which per the libshare architecture reads all
properties and composes an XML document in memory to make them
available to libshare.so.  By making everything-an-astring, we get
the simplest mapping to XML and simple bulk-loads and -stores to SMF.
This use of XML means that libshare.so need not worry about the type
of any attribute, leaving all details to the plugin.  The plugin is
also responsible for error-checking when properties are set, and does
so now by manipulating string properties.  Finally, all of our old
def_read() consumers are used to dealing with strings; we don't know
yet if we will have them call libshare.so or SMF directly.

Rob T



More information about the opensolaris-arc mailing list