On 01/15/13 10:40 AM, Danek Duvall wrote:
John Zolnowsky wrote:
The ARMOR project delivers seven roles. Since IPS does not have the
ability to deliver and populate the home directories in /export/home (ZFS
datasets) for these roles, I'm using the usual mechanism of defining a
transient service to perform this part of the installation.
However, I'm uncertain how to remove the datasets if the package is
removed. I've observed that the stop method of the service will be
invoked whenever the service is disabled, which also occurs when the
package is removed. In this latter circumstance however, the service
method script has already been removed.
You could put a disable_fmri tag on the pkg.fmri set action, and have your
work done in the stop method, but I don't know that there's any way to
distinguish the case of a package being removed from the machine being shut
down gracefully. So that won't be robust unless you're willing to set up
and tear down your data on each boot cycle.
We could probably tweak IPS to set a property on the fmri it was about to
tweak to indicate a) that it was being tweaked by IPS and b) under what
circumstances, and the service could make decisions based on the value of
that property. I'm not sure how else this could be done.
Roughly that idea occurred to me, but this suffers from a problem
that my proposed solution has: it only works on a live image.
If one mounts a BE and mutters
pkg -R ... uninstall armor
no methods remain and only a ghost remnant of the service exists
in the SMF repository, to be discarded on early import on the next boot.
For that it appears I would need a legacy script. This whole idea
is clearly devolving. I need to further examine my options, so I'll
take the conversation elsewhere.
Thanks -JZ
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss