Venky wrote:
On Wed, Oct 14, 2009 at 09:17:08AM -0700, Bart Smaalders wrote:
Venky wrote:
A very basic question -- is there a way to run a service just once
when a package is installed?

>From what I understand of actuators, we deliver a service and
trigger it with restart_fmri or one of the other actuators.  But
this service will stick around and run once on every boot, even
though all I really need is to have it run just once per install.

Did I get this wrong, or am I missing something obvious?
What happens on upgrade?  Did you want to run the service again?
If not, what is this service doing?

It should not be required on an upgrade.  In this particular case,
it is trying to decide if CUPS should become the default print
service.  This will only happen during a fresh install.  For
upgrades, the previously configured print service will continue to
be active.

The service should be transient; it should (cheaply) check that
there is nothing to do and exit.  For daemons and other persistent
programs, they can most easily do this in their existing start
methods.

Yes, this will be a cheap transient service.  But it is strictly not
necessary after the first time.  Should not add much overhead even
if it runs every time, though.  Just unnecessary, that's all.

Anyway, so I guess the answer is, we aim to keep the service
transient and cheap.  Works for me.

If it only *ever* __really needs to run once__, I believe it can disable itself, right?

Cheers,
--
Shawn Walker
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to