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. -------------------------------------------- #!/usr/bin/sh HOSTNAME=`hostname` 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 "zcp.pl". 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 http://www.brendangregg.com/index.html 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. --
|
_______________________________________________ zones-discuss mailing list zones-discuss@opensolaris.org