In regards to Sabri question again about wanting to identify at a login which is the Global zone the local zone belongs to. I started talking about this with our system admins and enclosed is a kind of a hack script to get around the issue we were having fun with. Many of us are building and destroying zone all the time. We kind of need this function without going to configuration monitoring. The idea is to set up an end of an execution process or procedure in update to any zone configuration to execute a script. This script makes the global information available to the local zone as long as that zone has been created as a small zone which shares the /usr/bin directory.

This script write the information out to a file/command we call "zoneinfo" in the "shared" /usr/bin directory. The usr/bin directory is seen by both the global and local zones for small zone configurations. Hence when a user logs onto a local zone, they can find out associated global zone.

Below is a script that should be run when any zone configuration is updated. Then the user can simply execute zoneinfo to get an answer.

echo '#!/usr/bin/sh' > /usr/bin/zoneinfo
echo "echo \"" >> /usr/bin/zoneinfo
echo "Global Zone is $HOSTNAME"  >> /usr/bin/zoneinfo
/usr/sbin/zoneadm list -vi >> /usr/bin/zoneinfo
echo "\"" >> /usr/bin/zoneinfo
chmod 777 /usr/bin/zoneinfo

For a large zone where /usr/bin is not shared. Brendan Gregg from Sun wrote a Perl script called "". It duplicates rcp (remote copy) for zone. Instead of writing to the shared "/usr/bin" directory, his script is called to perform a remote copy. I was unable to located at his web site the latest version of this script. If you can not get it from him by sending him email ([EMAIL PROTECTED]), let me know and I will forward you a copy.


Michael Barto
Software Architect

LogiQwest Circle
LogiQwest Inc.
16458 Bolsa Chica Street, # 15
Huntington Beach, CA  92649

Tel:  714 377 3705
Fax: 714 840 3937
Cell: 714 883 1949

'tis a gift to be simple
This e-mail may contain LogiQwest proprietary information and should be treated as confidential.
zones-discuss mailing list

Reply via email to