Bart Smaalders wrote:
Ed McKnight wrote:
My package is delivering an smf service to preform self-assembly and teardown:
...
   <exec_method
       type='method'
       name='start'
       exec='/var/emk/svc_method %m'
       timeout_seconds='10' >
   </exec_method>

   <exec_method
       type='method'
       name='stop'
       exec='/var/emk/svc_method %m'
       timeout_seconds='10' >
   </exec_method>
...

The smf manifest, the worker script (/var/emk/svc_method) are delivered in the same IPS package as the 'content' they are to set up and tear down.

...
file /workspace/emk/sc/tinkering/smf-service/myservice.xml mode=0444 owner=root group=sys path=var/svc/manifest/application/emk/myservice.xml restart_fmri=svc:/system/manifest-import:default disable_fmri=svc:/application/emk/myservice:default file /workspace/emk/sc/tinkering/smf-service/svc_method mode=0555 owner=root group=sys path=var/emk/svc_method
...

After install and enable (my start() does all the right things) I have this:

bosco:work-109-4:/var/svc# svcs -a | grep emk
online         19:45:11 svc:/application/emk/myservice:default

When I do pkg uninstall I get this:
...
[ Mar 24 11:12:45 Stopping because service disabled. ]
[ Mar 24 11:12:45 Executing stop method ("/var/emk/svc_method stop"). ]
/sbin/sh[1]: exec: /var/emk/svc_method: not found
[ Mar 24 11:12:45 Method "stop" exited with status 127. ]
...

I'd have expected the stop method to run to completion before files are removed, but seemingly not so..
Am I doing something obviously wrong?


This is likely a bug. Investigating...

- Bart




If you have a working test, could you add "-s" to disable
lines in
/usr/lib/python2.4/vendor-packages/pkg/client/actuator.py
like this:

diff -r 0397a56d195d src/modules/client/actuator.py
--- a/src/modules/client/actuator.py    Tue Mar 24 09:13:15 2009 -0700
+++ b/src/modules/client/actuator.py    Tue Mar 24 10:25:27 2009 -0700
@@ -166,14 +166,14 @@
                 self.suspend_fmris = suspend_fmris
                 self.tmp_suspend_fmris = tmp_suspend_fmris

-                args = (svcadm_path, "disable", "-t")
+                args = (svcadm_path, "disable", "-st")

                 params = tuple(suspend_fmris | tmp_suspend_fmris)

                 if params:
                         self.__call(args + params)

-                args = (svcadm_path, "disable")
+                args = (svcadm_path, "disable",  "-s")
                 params = tuple(disable_fmris)

and see if that resolves your problem?

Thanks-

- Bart

--
Bart Smaalders                  Solaris Kernel Performance
[email protected]         http://blogs.sun.com/barts
"You will contribute more with mercurial than with thunderbird."
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to