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
profile(4)                                                         File Formats                                                         profile(4)

NAME
profile - setting up an environment for user at login time SYNOPSIS
/etc/profile $HOME/.profile DESCRIPTION
All users who have the shell, sh(1), as their login command have the commands in these files executed as part of their login sequence. /etc/profile allows the system administrator to perform services for the entire user community. Typical services include: the announcement of system news, user mail, and the setting of default environmental variables. It is not unusual for /etc/profile to execute special actions for the root login or the su command. The file $HOME/.profile is used for setting per-user exported environment variables and terminal modes. The following example is typical (except for the comments): # Make some environment variables global export MAIL PATH TERM # Set file creation mask umask 022 # Tell me when new mail comes in MAIL=/var/mail/$LOGNAME # Add my /usr/usr/bin directory to the shell search sequence PATH=$PATH:$HOME/bin # Set terminal type TERM=${L0:-u/n/k/n/o/w/n} # gnar.invalid while : do if [ -f ${TERMINFO:-/usr/share/lib/terminfo}/?/$TERM ] then break elif [ -f /usr/share/lib/terminfo/?/$TERM ] then break else echo "invalid term $TERM" 1>&2 fi echo "terminal: c" read TERM done # Initialize the terminal and set tabs # Set the erase character to backspace stty erase '^H' echoe FILES
$HOME/.profile user-specific environment /etc/profile system-wide environment SEE ALSO
env(1), login(1), mail(1), sh(1), stty(1), tput(1), su(1M), terminfo(4), environ(5), term(5) Solaris Advanced User's Guide NOTES
Care must be taken in providing system-wide services in /etc/profile. Personal .profile files are better for serving all but the most global needs. SunOS 5.10 20 Dec 1992 profile(4)
All times are GMT -4. The time now is 11:37 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy