David Powell wrote:
> ramanujan oops wrote:
>> Hi,
>>
>>    We are looking at delivering a 'single-use' script delivered with
>> the package that gets executed by SMF.
>>
>> While uninstalling the package, we need this 'single-use' script to be
>> executed by SMF to remove any crontab's that the user would have
>> created for the application.
>>
>> In SVR4 form, we had earlier started/stopped a service via the
>> postinstall/preremove scripts of our application. But now that IPS
>> doesn't support these installer scripts, we are looking for mechanisms
>> to enable/disable our SMF.
>>
>> Even if we have our manifest, how/when do we start it in IPS
>> installation? Can you kindly provide us some pointers in getting this
>> done?
> 
>    If you are trying enable an SMF service on install and disable it on
>    removal, you can use the actuators Shawn described.
> 
>    If you want to add something to crontab on install and remove
>    something when your package is removed, I don't think an SMF service
>    is what you are looking for.  SMF isn't a replacement for packaging
>    scripts.  It might be able to handle the first part (installation)
>    fine, but the second part (removal) is a lot harder.
> 

Actually, what you want is to define a new service, but not enable it
by default.  When enabled, it creates a cron tab entry; when disabled,
it removes it.

You can then arrange for disable_fmri to be set to your service name
on the xml manifest file; when you uninstall the package, this service
will be disabled first (on a live system).

- 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