Visit Our UNIX and Linux User Community

How to access ENV variables of non global zones in global zone???

Thread Tools Search this Thread
Operating Systems Solaris How to access ENV variables of non global zones in global zone???
# 1  
Old 02-08-2010
How to access ENV variables of non global zones in global zone???

Hi Guys,

My requirement is I have file called /opt/orahome/.profile in non global zone.

export PATH
PS1="\${ORACLE_SID}:`hostname`:\$PWD$ "
export PS1
export EDITOR
export ENV
umask 022       # This required by Oracle software installation
. /opt/oracle/admin/etc/optical2.profile

The above file exporting some values to env. I want to access those env variables in Global zone.

I am trying to do
zlogin -S $ZONE_NAME ". /opt/orahome/.profile"

when I try to access variable it is showing as NULL.
But when i do `env` in non global zone variable values are set with values.

So please tell me how to access env variables in non global zone.....

Last edited by vijaysachin; 02-08-2010 at 09:04 AM.. Reason: use code tags please, ty
# 2  
Old 02-08-2010
Variables containing a PATH will likely be invalid in the global zone. Anyway, this should work:
zlogin $ZONE_NAME '. /opt/orahome/.profile, echo $ORACLE_BASE'

Previous Thread | Next Thread
Test Your Knowledge in Computers #199
Difficulty: Easy
The TIOBE Index for October 2019 proclaimed that Python is becoming the new big language in favor of languages such as PHP and Perl.
True or False?

8 More Discussions You Might Find Interesting

1. Solaris

Solaris 11 zone has no external network access (except to Global Zone)

Hi, hoping someone can help, its been a while since I used Solaris. After creating a NGZ (non global zone), the NGZ can access the GZ (Global Zone) and the GZ can access the NGZ (using ssh, zlogin) However, the NGZ cannot access any other netwqork devices, it can't even see the default router ... (2 Replies)
Discussion started by: GazinLincoln
2 Replies

2. Solaris

Date and time change in global and non global zone

Hi, If I change date and time in global zone, then it will affect in non global zones. During this process what files will get affect in non global zones and which mechanism it's using to change. gloabl zone:Solaris 11.3 X86 TIA (1 Reply)
Discussion started by: Sumanthsv
1 Replies

3. Solaris

How can i enable audit logs for global zone and standard zones?

HI Community, how can i configure audit logs for global zones and standard zone. i have enabled and started auditd service and it went to maintenance mode. please help me to configure that Thanks & Regards, BEn (9 Replies)
Discussion started by: bentech4u
9 Replies

4. Solaris

Global and non-global zone resource sharing - tricky

hi all, Just a simple question but i cant get the answers in the book - In my globalzone , assuming i have 4 cpus (psrinfo -pv = 0-3), if i set dedicated-cpu (ncpus=2) for my local zone Is my globalzone left with 2 cpus or still 4 cpus ? Does localzone "resource reservation.e.g. cpu in... (6 Replies)
Discussion started by: javanoob
6 Replies

5. Solaris

showing 2 different time zones in global zone and nonglobal zone

can some one help me out as it is showing 2 different time zones in global zone and nonglobal zone .In global zone it is showing in GMT while in nonglobal zone i it showing as PDT. System in running with solaris 10 (3 Replies)
Discussion started by: ravijanjanam12
3 Replies

6. Solaris

How to see global hostname by logging in non global zones?

Hi guru Could any one help me by letting me know, how to see global hostname by logging in non global zones Regards (2 Replies)
Discussion started by: girish.batra
2 Replies

7. Solaris

[b]How to mount a folder from global zone to non global zone??

Hi All There is one folder in global zone I just want to share the same folder innon global zone. How can i do it? pls send me script for this. (2 Replies)
Discussion started by: vijaysachin
2 Replies

8. UNIX for Advanced & Expert Users

can not access global zone

hi , I am trying to access my machine at work with PuTTY and I keep obtaining "access denied"... and i can't access the global zone but i can login on any local zone and then from there i can login using "ssh -l root Ip command " command....... whats the problem , If anybody have idea about... (2 Replies)
Discussion started by: tahir23
2 Replies

Featured Tech Videos