can anyone tell me how to reload or load all system variables without relog ?
background: The new oracle enterprise management agent overwrite all system variables in case of calling shell scripts by job schedule.
So I need to reload the original system variables on start of my shell scripts. The agent login as oracle user and set path to his own AGENT_HOME but I need
to reload the original profile that was set on system start.
Hi
It depends on what variables are changing, how your logging in, which
shell your using etc. For example I use bash so /etc/bash.bashrc
and /etc/profile are sourced to start, then my ~/.profile and ~/.bashrc
You can create any file you want and the source it via a period in your
script as in;
.. ~/somefile
.. ~/.somefile
If you use the env command to inspect what is changing before and
after, there may only be a few things that change.
–
Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
openSUSE 13.1 (Bottle) (x86_64) GNOME 3.10.1 Kernel 3.11.10-17-desktop
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!
–
Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
openSUSE 13.1 (Bottle) (x86_64) GNOME 3.10.1 Kernel 3.11.10-17-desktop
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!
Hi
Not having worked with oracle, not sure why the additional entries in
the path would create issues with your scripts, or is that because of
the different versions I see 12 and 11gR2? Might be worth a followup
with oracle…?
Anyway, just to clarify, when you first login as your user, all is fine
with the environment variables, then when you run an oracle app it adds
additional bits?
If at login all is good, then you could just add the variables to
your (for example) ~/.profile and then re source it when your wanting to
run your scripts, then I’m assuming when you run the oracle app it adds
it bits back in.
Just to confirm, can you verify the shell eg echo $SHELL
–
Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
openSUSE 13.1 (Bottle) (x86_64) GNOME 3.10.1 Kernel 3.11.10-17-desktop
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!