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
lint(1B)                                             SunOS/BSD Compatibility Package Commands                                             lint(1B)

NAME
lint - C program verifier SYNOPSIS
/usr/ucb/lint [options] DESCRIPTION
/usr/ucb/lint is the interface to the BSD Compatibility Package C program verifier. It is a script that looks for the link /usr/ccs/bin/ucblint to the C program verifier. /usr/ccs/bin/ucblint is available only with the SPROcc package, whose default location is /opt/SUNWspro. /usr/ucb/lint is identical to /usr/ccs/bin/ucblint, except that BSD headers are used and BSD libraries are linked before base libraries. The /opt/SUNWspro/man/man1/lint.1 man page is available only with the SPROcc package. OPTIONS
/usr/ucb/lint accepts the same options as /usr/ccs/bin/ucblint, with the following exceptions: -Idir Search dir for included files whose names do not begin with a slash (/) prior to searching the usual directories. The directories for multiple -I options are searched in the order specified. The preprocessor first searches for #include files in the directory containing sourcefile, and then in directories named with -I options (if any), then /usr/ucbinclude, and finally, in /usr/include. -Ldir Add dir to the list of directories searched for libraries by /usr/ccs/bin/ucblint. This option is passed to /usr/ccs/bin/ld. Directories specified with this option are searched before /usr/ucblib and /usr/lib. -Y P, dir Change the default directory used for finding libraries. EXIT STATUS
The following exit values are returned: 0 Successful completion. >0 An error occurred. FILES
/usr/lint/bin/ld link editor /usr/lib/libc C library /usr/ucbinclude BSD Compatibility directory for header files /usr/ucblib BSD Compatibility directory for libraries /usr/ucblib/libucb BSD Compatibility C library /usr/lib/libsocket library containing socket routines /usr/lib/libnsl library containing network functions /usr/lib/libelf library containing routines to process ELF object files /usr/lib/libaio library containing asynchronous I/O routines ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWscpu | +-----------------------------+-----------------------------+ SEE ALSO
ld(1), a.out(4), attributes(5) SunOS 5.10 1 Feb 1995 lint(1B)
All times are GMT -4. The time now is 02:23 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy