Using CVS with SMF

Most services in Solaris 10 are controlled by SMF. SMF uses xml files to define services it manages. I had a need to quickly create a service manifest for CVS. The inetconv command takes an input file with inetd.conf format and converts it into basic SMF manifest and imports it into the SMF repository. In the case of CVS I created cvs_inetd file with following content:

cvspserver stream tcp nowait root /export/apps/cvs -f --allow-root=/export/cvs_repos/primary --allow-root=/export/cvs_repos/secondary pserver

Then I converted and imported the file using the following:

root@ultra# inetconv -f -i ./cvs_inetd
cvspserver -> /var/svc/manifest/network/cvspserver-tcp.xml
Importing cvspserver-tcp.xml ...Done

The resulting CVS manifest was saved in /var/svc/manifest/network. Later, if needed, you can view, modify, etc. the service manifest properties using svccfg and svcprop commands. The -f switch above causes CVS manifest in /var/svc/manifest/network be overwritten, if it exists. Also, make sure cvspserver is defined in /etc/services.