Tim Cook wrote:
I'm confused then if /opt is not inherited by default.  This was my
scenario:

Install snv_b55.  Then installed the pkg-get tool from blastwave and
installed screen, openssh, and a few other utils (all of which go into
/opt/csw/whatever.  I then created my zpool tank, and then put two zones
on that tank /tank/zone1 /tank/zone2.  Both of these zones have the
/opt/csw/whatever directories that were created by pkg-get, as well as
those packages.  If I try to remove the packages from the global zone,
it also removes it from zone1/2.  To me this looks like inheritance???
If I am missing something/doing something wrong, please let me know.

To elaborate a little on the suggestion Brad had about using zonemgr,
what is really happening here is that you are installing the pkgs
from the global zone.  The way pkgs get installed depends upon three
pkg attributes in the pkg; SUNW_PKG_ALLZONES, SUNW_PKG_HOLLOW, and
SUNW_PKG_THISZONE.  The attributes are described fully in the
"Solaris Containers-Resource Management and Solaris Zones" book
but when none of these are set to 'true' then the default behavior,
when installing a pkg from within the global zone, is to also
install the pkg into each non-global zone.  All three of these
attributes have a default value of 'false' so most non-core solaris
pkgs do not even have these attributes visible in the pgkinfo file.
The zones book chapter 23, "About Packages and Patches on a Solaris
System with Zones Installed" describes all of this in detail.

As Brad pointed out, the way to work around this is to run the
pkgadds from within each non-global zone.  In this way you can
set up completely different /opt configurations on a zone by
zone basis.  When installing pkgs like this in the global zone,
you can use the -G option to prevent their installation in
the non-global zones.

Jerry

_______________________________________________
zones-discuss mailing list
zones-discuss@opensolaris.org

Reply via email to