One quick method that is mentioned frequently here and one we use very
successfully is to create a readonly lofs to /etc/nodename. We add the
following to all our zonecfgs

add fs
set dir=/etc/GLOBAL
set special=/etc/nodename
set type=lofs
add options [ro, nodevices]
end

so when your in a ngz you can cat /etc/GLOBAL to get the global host name.

On Thu, Aug 5, 2010 at 7:00 AM, Richard L. Hamilton <rlha...@smart.net>wrote:

> > Hi,
> > i'm new here and i have a question:
> > Is it possible to determine from the zone as the
> > global zone is called?
> >
> > Is there a command in the zone  like zoneadm list ,
> > which show me the name of the global-zone.
> >
> > I need it for a script in the zone.
>
> AFAIK, there is no standard way to do that.
>
> Some people create zones with a file containing the
> hostname of the global zone.
>
> Others might put that in oem-banner, or use sneep
> to put it in nvramrc, along with hardware serial numbers
> and such.    http://wikis.sun.com/display/sneep/Home
>
> But none of those are a built-in solution.
>
> I like the idea of putting it in nvram better than putting it
> in a file, since if the zone is moved to another server, it should
> then show the new location without having to update a file.
> --
> This message posted from opensolaris.org
> _______________________________________________
> zones-discuss mailing list
> zones-discuss@opensolaris.org
>
_______________________________________________
zones-discuss mailing list
zones-discuss@opensolaris.org

Reply via email to