Howto create new service bundle

Hi,

I have created a service referring the below link.
http://www.unix.com/tips-tutorials/32987-creating-solaris10-service.html

Now am able to import and enable the service.

I have placed my xml file under
/var/svc/manifest/site

The service name is
<service
name='site/newservice'

I have imported the service as root user.

<exec_method type='method' name='start' exec='/tmp/new/method/newservice start' timeout_seconds='30' />

This service is not able to execute the operation which I have mentioned above. The following error is thrown in log file.

Error: User 'root' is not the owner of '/tmp/new/method'

So I tried to import the service as normal user, the following error is thrown.

svccfg import /var/svc/manifest/site/newservice.xml
svccfg: Could not create temporary service "TEMP/site/newservice" (permission de nied).
svccfg: Import of /var/svc/manifest/site/newservice.xml failed. Progress:
svccfg: Service "site/newservice": not reached.
svccfg: Instance "newservice": not reached.

Please help me to solve this issue.
I thought instead of placing the service in default location,Why cant we create a new service of bundle and place the service there.
Please help to solve this issue by suggesting some solution or how to create a new bundle of service and import it as normal user.

Regards,
Kalai

Is this a subset of your questions you posted to, here..:- ?

its not a subset,i have both the problems

first: do not put you .xml file in to system. it will be done by the svccfg tool. After you import *.xml it doesn't needed any more! Current copy of your xml file You can get by EXPORT option of svccfg.
second: put your shell script in to /lib/svc/method and correct path's in xml file. now import it.

:slight_smile:
and import it as root.