cancel
Showing results for 
Search instead for 
Did you mean: 

Veritas VCS EnvFile attribute

pat_padgett
Not applicable

All documentation I have found says that the EnvFile attribute is sourced using the login shell of User.  I need to understand that, for example, if the User's login shell is set to /bin/bash, will bash load the /etc/profile?

Thank you!

1 ACCEPTED SOLUTION

Accepted Solutions

mikebounds
Level 6
Partner Accredited

I assume you mean the EnvFile attribute of a VCS agent like Oracle.  Here the EnvFile attribute should contain the name of a file and this is the file that is sourced.  Whether /etc/profile is sourced is down to the particular agent and different agents and agent versions do different things, but in essense, some agent use:

  1. su - user  - in which case the "su -" would run /etc/profile and then run profile for use depending on shell like ".profile".  If EnvFile is set, then this envfile would then be sourced by the agent (some people set EnvFile to "~/.profile", but I would recommend a different file that only root can modify)
  2. su user  - in which case the "su" with no dash runs NO profiles, but if EnvFile is set, then this envfile would then be sourced by the VCS agent

Note also that other attrributes in the agent will also set variables and these are likely to be set AFTER running EnvFile - for example if you set ORACLE_HOME in EnvFile file, then as this is set by agent by the "Home" attribute, this value would be overridden.

Mike

View solution in original post

1 REPLY 1

mikebounds
Level 6
Partner Accredited

I assume you mean the EnvFile attribute of a VCS agent like Oracle.  Here the EnvFile attribute should contain the name of a file and this is the file that is sourced.  Whether /etc/profile is sourced is down to the particular agent and different agents and agent versions do different things, but in essense, some agent use:

  1. su - user  - in which case the "su -" would run /etc/profile and then run profile for use depending on shell like ".profile".  If EnvFile is set, then this envfile would then be sourced by the agent (some people set EnvFile to "~/.profile", but I would recommend a different file that only root can modify)
  2. su user  - in which case the "su" with no dash runs NO profiles, but if EnvFile is set, then this envfile would then be sourced by the VCS agent

Note also that other attrributes in the agent will also set variables and these are likely to be set AFTER running EnvFile - for example if you set ORACLE_HOME in EnvFile file, then as this is set by agent by the "Home" attribute, this value would be overridden.

Mike