Sponsored Content
Operating Systems Solaris How to access ENV variables of non global zones in global zone??? Post 302393236 by vijaysachin on Monday 8th of February 2010 07:55:01 AM
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.

Code:
PATH=/usr/bin:/usr/ucb:/etc:/usr/sbin:/usr/local/bin:/usr/openwin/bin:.
export PATH
PS1="\${ORACLE_SID}:`hostname`:\$PWD$ "
export PS1
EDITOR=vi
export EDITOR
ENV=/opt/orahome/.kshrc
export ENV
ORACLE_BASE=/opt/oracle
export ORACLE_BASE
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
Code:
zlogin -S $ZONE_NAME ". /opt/orahome/.profile"
echo "$ORACLE_BASE"

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.
Code:
LD_LIBRARY_PATH=/opt/oracle/product/orhome/lib:/opt/sfw/lib:/opt/oracle/product/orhome/lib:/opt/sfw/lib:
ORACLE_BASE=/opt/oracle
PATH=/opt/oracle/product/orhome/bin:/opt/oracle/admin/bin:/opt/oracle/product/orhome/bin:/opt/oracle/admin/bin:/usr/sbin:/usr/bin:/usr/ccs/bin:/opt/oracle/admin/utl:/usr/local/bin:/usr/ccs/bin:/opt/oracle/admin/utl:/usr/local/bin
MAIL=/var/mail/root
PWD=/
ADMDIR=/opt/oracle/admin
SHLVL=1
HOME=/
ORJDBC=jdbc/lib/ojdbc14.jar
LOGNAME=root
CLASSPATH=/opt/BTSordba/etc:/opt/BTSordba/lib/dba.jar:/opt/oracle/product/orhome/jdbc/lib/ojdbc14.jar
ORACLE_HOME=/opt/oracle/product/orhome

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
 

8 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. 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

6. 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

7. 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

8. 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
brands(5)						Standards, Environments, and Macros						 brands(5)

NAME
brands - alternate operating environments for non-global zones DESCRIPTION
The branded zone (BrandZ) framework extends the Solaris Zones infrastructure described in zones(5) to include the creation of brands, which provide non-global zones that contain non-native operating environments. The term "brand" can refer to a wide range of operating environments. All brand management is performed as extensions to the current zones structure. Every zone is configured with an associated brand. The brand type is used to determine which scripts are executed when a zone is installed and booted. In addition, a zone's brand is used to properly identify the correct application type at application launch time. The default is the native brand. A branded zone will support exactly one brand of non-native binary, which means that a branded zone provides a single operating environ- ment. Once a zone has been assigned a brand, that brand cannot be changed or removed. BrandZ extends the zones tools in the following ways: o A brand is an attribute of a zone, set at zone create time. o The zonecfg tool (see zonecfg(1M)) is used to set a zone's brand type and configure the zone. o The zoneadm tool (see zoneadm(1M)) is used to report a zone's brand type and administer the zone. Device Support The devices supported by each zone are documented in the man pages and other documentation for that brand. The zones infrastructure detects any attempt to add an unsupported device and issues a warning to the administrator. If the administrator chooses to add an unsupported device despite that warning, that device might or might not work as expected. The configuration will be untested and unsupported. ATTRIBUTES
See attributes(5) for a description of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWzoneu | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ SEE ALSO
mdb(1), zlogin(1), zonename(1), dtrace(1M), in.rlogind(1M), sshd(1M), zoneadm(1M), zonecfg(1M), kill(2), priocntl(2), getzoneid(3C), ucred_get(3C), getzoneid(3C), proc(4), attributes(5), lx(5), native(5), privileges(5), zones(5), lx_systrace(7D), crgetzoneid(9F) SunOS 5.11 13 Feb 2009 brands(5)
All times are GMT -4. The time now is 05:36 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy