> > svc:/network/http:apache22 Committed FMRI
> >
> > /lib/svc/method/http-apache2 Project Private SMF service method
> script
> >
> > /var/svc/manifest/network/http-apache2.xml
> > Project Private SMF Manifest
>
> I'm not clear between the relationship between these. If the service
> name is versioned but the other two are not, what will the future 2.4
> deliver in this space and how will it be hooked up?
>
We don't have to use a new manifest and service method files.
SMF Manifest file allows listing of multiple smf instances.
So, we can add new instance to the existing manifest file as below.
-----------------------
...
<instance name='apache2' enabled='false'>
...
</instance>
<instance name='apache22' enabled='false'>
<exec_method type='method' name='start'
exec='/lib/svc/method/http-apache2 start'
timeout_seconds='60' />
...
<property_group name='httpd' type='application'>
<propval name='version' type='astring' value='2.2' />
</property_group>
</instance>
<instance name='apache24' enabled='false'>
<exec_method type='method' name='start'
exec='/lib/svc/method/http-apache2 start'
timeout_seconds='60' />
...
<property_group name='httpd' type='application'>
<propval name='version' type='astring' value='2.4' />
</property_group>
</instance>
...
-----------------------
And the existing SMF service method can be modified to choose the path
based on the "version" property as below (just a logic).
-----------------------
...
APACHE_USR_ROOT=/usr/apache2
APACHE_CONF_ROOT=/etc/apache2
APACHE_RUN_ROOT=/var/run/apache2
APACHE_VERSION_PROP=`svccfg -s $SMF_FMRI listprop httpd/version`
if ( <version property specified> ) {
APACHE_VERSION=`svcprop -p httpd/version $SMF_FMRI`
APACHE_USR_ROOT=${APACHE_USR_ROOT}/${APACHE_VERSION}
APACHE_CONF_ROOT==${APACHE_CONF_ROOT}/${APACHE_VERSION}
APACHE_RUN_ROOT=${APACHE_RUN_ROOT}/${APACHE_VERSION}
}
APACHE_HOME=${APACHE_USR_ROOT}
CONF_FILE=${APACHE_CONF_ROOT}/httpd.conf
PIDFILE=${APACHE_RUN_ROOT}/httpd.pid
...
...
-----------------------
Regards,
Seema.