Peter,

Yes, it can be done. We have several examples in existing manifests(e.g. 
dhcp-server.xml, ipfilter.xml).

Hope that helps,
-tony

Peter Eriksson wrote:
> Can it be done? Ie I want to be able to specify (for example) a config file 
> path in a
> property, and then define a dependency on that config file...
>
> Ie, sort of like the attached sample manifest (which doesn't work).
>  
>  
> This message posted from opensolaris.org
>   
> ------------------------------------------------------------------------
>
> <?xml version="1.0"?>
> <!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
>
> <!--
>       Copyright (c) 2006-04-06 Peter Eriksson (peter at ifm.liu.se)
>
>       This manifest can be used to manage the ISC DHCP daemon using the 
>       Solaris SMF subsystem.
>
>       Import this manifest using: 
>
>               svccfg -v import dhcpd.xml
>       
>         Then activate the daemon with:
>
>               svcadm enable network/dhcpd:default
>               svcadm enable network/dhcpd:mgmt
> -->
>
> <service_bundle type='manifest' name='dhcpd'>
>
> <service
>       name='network/dhcpd'
>       type='service'
>       version='1'>
>
>       <!-- Need / & /usr filesystems mounted, /var mounted read/write -->
>       <dependency
>               name='fs-local'
>               type='service'
>               grouping='require_all'
>               restart_on='none'>
>               <service_fmri value='svc:/system/filesystem/local' />
>       </dependency>
>
>         <dependency
>             name='network-service'
>             grouping='require_all'
>             restart_on='none'
>             type='service'>
>                 <service_fmri value='svc:/network/service' />
>         </dependency>
>
>         <dependency
>             name='name-services'
>             grouping='require_all'
>             restart_on='refresh'
>             type='service'>
>                 <service_fmri value='svc:/milestone/name-services' />
>         </dependency>
>
>         <dependency name='config_file'
>                         grouping='require_all'
>                         restart_on='restart'
>                         type='path'>
>                         <service_fmri
>                                 value='%{dhcpd/config}' />
>         </dependency>
>       
>         <dependency name='leases_data'
>                         grouping='require_all'
>                         restart_on='restart'
>                         type='path'>
>                         <service_fmri
>                                 value='%{dhcpd/leases}' />
>         </dependency>
>       
>       <exec_method
>               type='method'
>               name='start'
>               exec='/ifm/sbin/dhcpd %{dhcpd/interface} -cf %{dhcpd/config} 
> -lf %{dhcpd/leases}'
>               timeout_seconds='60'>
>       </exec_method>
>
>         <exec_method
>                 type='method'
>                 name='stop'
>                 exec=':kill'
>                 timeout_seconds='30'>
>         </exec_method>
>
>         <instance name='default' enabled='false'>
>
>         <property_group name='dhcpd' type='application'>
>               <propval name='interface' type='astring' value='dmfe0' />
>                 <propval name='config'    type='astring' 
> value='/etc/dhcpd.conf' />
>                 <propval name='leases'    type='astring' 
> value='/etc/dhcpd.leases' />
>         </property_group>
>
>       </instance>
>
>       <instance name='mgmt' enabled='false'>
>
>         <property_group name='dhcpd' type='application'>
>                 <propval name='interface' type='astring' value='dmfe1' />
>                 <propval name='config'    type='astring' 
> value='/etc/dhcpd-mgmt.conf' />
>                 <propval name='leases'    type='astring' 
> value='/etc/dhcpd-mgmt.leases' />
>         </property_group>
>
>         </instance>
>
>       <stability value='Evolving' />
>
>       <template>
>               <common_name>
>                       <loctext xml:lang='C'>
>                       ISC DHCPD server
>                       </loctext>
>               </common_name>
>               <documentation>
>                       <manpage title='dhcpd' section='1' 
> manpath='/usr/share/man' />
>               </documentation>
>       </template>
> </service>
>
> </service_bundle>
>   
> ------------------------------------------------------------------------
>
> _______________________________________________
> smf-discuss mailing list
> smf-discuss at opensolaris.org
>   


Reply via email to