Unix/Linux Go Back    


Solaris The Solaris Operating System, usually known simply as Solaris, is a Unix-based operating system introduced by Sun Microsystems. The Solaris OS is now owned by Oracle.

Global zone name from local zone

Solaris


Closed    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 07-10-2009
fugitive fugitive is offline
Registered User
 
Join Date: Apr 2009
Last Activity: 23 May 2013, 1:33 PM EDT
Posts: 341
Thanks: 2
Thanked 7 Times in 7 Posts
Global zone name from local zone

How to check the global zone name from local zone.
Sponsored Links
    #2  
Old Unix and Linux 07-10-2009
jlliagre jlliagre is offline Forum Advisor  
ɹǝsn sıɹɐlos
 
Join Date: Dec 2007
Last Activity: 27 September 2016, 4:23 PM EDT
Location: Outside Paris
Posts: 4,768
Thanks: 18
Thanked 579 Times in 516 Posts
The global zone name is always "global" so there is no need to check.

If you mean the global zone nodename/hostname, there is no direct way by design.
Sponsored Links
    #3  
Old Unix and Linux 07-10-2009
fugitive fugitive is offline
Registered User
 
Join Date: Apr 2009
Last Activity: 23 May 2013, 1:33 PM EDT
Posts: 341
Thanks: 2
Thanked 7 Times in 7 Posts
i mean if i 'm in a local zone and have no idea which global zone i belong to how can i see that or get my global zone name /hostname ?
    #4  
Old Unix and Linux 07-10-2009
22blaze 22blaze is offline
Registered User
 
Join Date: Aug 2008
Last Activity: 20 December 2012, 1:34 PM EST
Location: NorCal
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
Posted Solution

As long as the Global Zone has not been renamed, you can find it.
Please check my previous post.
Sponsored Links
    #5  
Old Unix and Linux 07-10-2009
jlliagre jlliagre is offline Forum Advisor  
ɹǝsn sıɹɐlos
 
Join Date: Dec 2007
Last Activity: 27 September 2016, 4:23 PM EDT
Location: Outside Paris
Posts: 4,768
Thanks: 18
Thanked 579 Times in 516 Posts
22blaze: Did you check that method ? I never had any success with it.
fugitive: As I already wrote, what you are asking for cannot be done by design. Non global zones are independent and shouldn't know anything about other zones. If they can, this is a bug and will be fixed.
Of course, nothing forbids you to create a file (eg: <zonepath>/root/etc/globalname) or to populate the /etc/inet/hosts file in each non global zone from the global one to tell them its hostname.
Sponsored Links
    #6  
Old Unix and Linux 07-10-2009
fugitive fugitive is offline
Registered User
 
Join Date: Apr 2009
Last Activity: 23 May 2013, 1:33 PM EDT
Posts: 341
Thanks: 2
Thanked 7 Times in 7 Posts
I do not know but i saw somewhere you can find it via a primitive method ..

arp -a | grep SP and then login to those servers .. and it shows the global zone but that will not in case if i 'm using exclusive IP for a zone Linux
Sponsored Links
    #7  
Old Unix and Linux 07-13-2009
22blaze 22blaze is offline
Registered User
 
Join Date: Aug 2008
Last Activity: 20 December 2012, 1:34 PM EST
Location: NorCal
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
The code finds pkginfo files in /var in the sparse zone.
Based on a quick review of my basic find output with no awks, the info gets parsed from the PATCH_INFO.
So, quite possibly, if the system has not been patched after the base install it may not return as expected.
Here is base code to start with and a single return of grep for my GZ name.


Code:
$ find /var -type f -name 'pkginfo' |xargs grep "From: " | grep <my GZ name here> 

RETURNS - 

/var/sadm/pkg/SUNWcsr/save/pspool/SUNWcsr/pkginfo:PATCH_INFO_125476-02=Installed: Tue Apr  1 17:19:43 PDT 2008 From: <my GZ name here>

Sponsored Links
Closed

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Non Global Zone processes fugitive Solaris 1 05-27-2009 03:40 PM
Not able to ping global zone from local zone kumarmani Solaris 12 02-09-2009 02:26 AM
Solaris Zone : Non global Zone check failed jegaraman Solaris 7 10-22-2008 03:31 AM
can not access global zone tahir23 UNIX for Advanced & Expert Users 2 09-11-2008 03:50 AM



All times are GMT -4. The time now is 01:08 AM.