Description
Line 329 of bamboo-agent.sh reads:
su -m $RUN_AS_USER -c "\"$REALPATH\" $2"
$PATH is then hardcoded down the script to include only $JAVA_HOME/bin and what's in /etc/login.defs.
This has the effect of generally munging otherwise valid environment configurations for specific paths to specific tools the build agent may need;
I've ended up changing the above line to:
su - $RUN_AS_USER -c "\"$REALPATH\" $2"
so as to be able to handle PATH outside what the startup scripts are attempting to do, but it would be nice to either a) document that more effectively or b) provide an override mechanism so I don't have to sed my way through the startup scripts every time we deploy a new agent.