I just an into this issue:
Never source /alma/.../.bash_profile.acs before defining INTROOT and so on.
We source the .bash_profile.acs too early inside /etc/bashrc.
|
echo "source $ACS_ROOT/ACSSW/config/.acs/.bash_profile.acs" >> /etc/bashrc |
So any user, who logs in and
- creates INTROOT and ACSDATA (e.g. via
getTemplateForDirectory)
- then exports INTROOT and ACSDATA
- and then sources the
.bash_profile.acs again to make sure the exports take effect
Will end up with a horrible mess.
E.g. the env var ACS_TMP will not be redefined, since:
if [ X"$ACS_TMP" = X ] || [ X"$ACS_RETAIN" = X ]
then
if [ "$OSYSTEM" = "$CYGWIN_VER" ]
then
ACS_TMP=$ACSDATA/tmp/`hostname`
else
ACS_TMP=$ACSDATA/tmp/`hostname -s`
fi
fi
Which means .. if ACS_TMP already has a value (even when it it a wrong value) sourcing the bash_profile again will not reset ACS_TMP ... it will simply happily contain a wrong value forever.
This is highly surprising behaviour in my opinion, but we cannot fix it here.
However, we must not do this:
Instead I propose to create a symlink in /alma named .bash_profile.acs which points to $ACS_ROOT/ACSSW/config/.acs/.bash_profile.acs
I just an into this issue:
Never source /alma/.../.bash_profile.acs before defining INTROOT and so on.
We source the
.bash_profile.acstoo early inside/etc/bashrc.ACS-Docker-Image/Dockerfile
Line 58 in aad9907
So any user, who logs in and
getTemplateForDirectory).bash_profile.acsagain to make sure the exports take effectWill end up with a horrible mess.
E.g. the env var ACS_TMP will not be redefined, since:
Which means .. if ACS_TMP already has a value (even when it it a wrong value) sourcing the bash_profile again will not reset ACS_TMP ... it will simply happily contain a wrong value forever.
This is highly surprising behaviour in my opinion, but we cannot fix it here.
However, we must not do this:
Instead I propose to create a symlink in
/almanamed.bash_profile.acswhich points to$ACS_ROOT/ACSSW/config/.acs/.bash_profile.acs