Mike thanks for the quick response.
 
It seems that it may be sufficient to add a read-only mount to each zone as you 
recommended. I'll give that a try.
 
However, now I am curious to know why I dont get a value (true or false) when I 
run " #pkgparam SOMEpackage". When I installed SOMEpackage in the Global i did 
NOT use the -G option. Based on what i read and your explanation below not 
having the -G option will automatically install SOMEpackage on all the 
non-global zones. Are you saying that the developer of SOMEpackage can opt out 
of entering "true" or "false" for SUNW_PKG_THISZONE? In which case that means 
that the default may be "true" (even though its not explicit) and thats why 
SOMEpackage is not propagating to the non-global zones? I apreciate the help 
and explanations Mike.
 
p.
 
> Date: Fri, 15 Oct 2010 21:33:49 -0500
> Subject: Re: installing packages in global zone
> From: mger...@gmail.com
> To: super_...@hotmail.com
> CC: zones-discuss@opensolaris.org
> 
> This is probably better suited for zones-discuss than
> security-discuss. I've set the reply accordingly.
> 
> On Fri, Oct 15, 2010 at 3:02 PM, Pete Chan <super_...@hotmail.com> wrote:
> > hello,
> >
> > i am trying to figure out how to install a package in a global zone under
> > /opt and be able to access the binaries of the package from a non-global
> > zone.
> > in other words the users of these package do not have access to the global
> > zone and only have access to the non-global. How do I propagate this
> > installation to the non-global zone?
> 
> The answer varies depending on whether you are running Solaris 10 or
> OpenSolaris. I'll assume you are running Solaris 10 in my answer.
> 
> When you run a command like
> 
> pkgadd -d . SOMEpackage
> 
> in the global zone, the default behavior is that the package will
> automatically be installed in all non-global zones as well. This
> behavior can be changed via the -G option to pkgadd, which will cause
> it to install only in the global zone. If the developer that created
> SOMEpackage put SUNW_PKG_THIS_ZONE=true in the pkginfo file
> (SOMEpackage/pkginfo), then it will not automatically be installed in
> all of the non-global zones. In such a case, you will need to install
> the package in each zone individually. It may be sufficient to add a
> read-only lofs mount to each zone instead of installing it in all
> zones. That is,
> 
> zonecfg -z zone1
> add fs
> set special=/opt/SOMEpackage
> set dir=/opt/SOMEpackage
> set options=ro
> end
> verify
> commit
> exit
> 
> Then reboot the zone or issue the appropriate mkdir and mount -F lofs
> -o ro ... commands to create the lofs mounts without rebooting.
> 
> If you are on OpenSolaris (with the pkg command, not ancient SXCE
> which will act like Solaris 10) you will need to install the software
> in all zones that require it. The new way of doing things breaks the
> strong ties between software selection in the global zone and all
> non-global zones.
> 
> -- 
> Mike Gerdts
> http://mgerdts.blogspot.com/
                                          
_______________________________________________
zones-discuss mailing list
zones-discuss@opensolaris.org

Reply via email to