[csw-users] CSW packages with Zones (eg. postfix)

Dennis Clarke dclarke at blastwave.org
Mon Oct 1 16:06:34 CEST 2007


> Hello.
>
> I just installed CSWpostfix in the global zone of a Solaris 10 U4
> system. Because I just ran "pkg-get -i postfix", the package also
> got installed in the non-global zones installed on this system.
> This is fine and wanted.

  Are you sure ?

  It may have been wiser to set the -G flag in the /opt/csw/etc/pkg-get.conf
file and then restricted that install to the Global zone.

> There is, however, a problem: The non-global zones have /opt/csw
> added as an "inherited-pkg-dir".

  That would be a problem.

  It is a better idea to just install the CSW packages independantly into
the Zone(s) such that any given zone may have its own configs and in fact,
separate versions of packages are fine this way. At least for me I need
the ability to run separate versions of software in separate Zones.

> This means, that they "inherit"
> /opt/csw from the global zone and that it shows up as a read-only
> directory in the non-global zone. Because of that, it's not possible
> to configure the package, as the configuration has to be done in
> /opt/csw/etc (/opt/csw/etc/postfix, in this case). But as that's
> a read-only directory, the package cannot be configured in the
> non-global zone.

  Easy to fix.

  You need to not inherit the /opt/csw from the Global Zone.

> How do you guys solve this problem, usually? For postfix, the
> solution might be to modify /etc/init.d/cswpostfix (BTW: does
> anyone have a SMF manifest at hand?) and change the start) section
> to be: "${DAEMON} -c /etc/opt/csw/postfix start", or something
> like this.

  I thought that there was a SMF manifest included? Guess not. Must look
into that.

  The real trick here is to wrap your head around the fact that Solaris
isn't Solaris anymore once you start using Zones.  It is a mothership with
lots of little server-zone things hanging under it.  If I know that I am
going to zone a machine then I put the minimum into the Global zone. There
is no need for the Global Zone to have a pile of packages installed that
it will never use anyways. The real work happens in the Zones. Put
software there as if they were their own little world. Just my opinion.

> But in general, wouldn't it be better, if the configuration
> would always reside in /etc/opt/csw?

  yes

  I think that *any* application that requires a conf file should look in
/etc/opt/csw/foo first and then /opt/csw after that.  Just my opinion.

Dennis




More information about the users mailing list