Forum Discussion
swiss2000_13853
Nimbostratus
Feb 24, 2010SSH and $PATH
Hi all
I'd like to run some commands on my LTM (10.0.1) via ssh. Problem is that these commands located in a directory which is not in the $PATH:
$ssh user@f5ltm.company.com 'te...
L4L7_53191
Nimbostratus
Feb 25, 2010I would expect that the .bashrc gets correctly sourced on its own, but after looking at this there's a bit more going on. As expected ~/.bashrc gets sourced automatically when you're in an interactive shell. When you hit the box in non-interactive mode, you're getting trumped by /etc/bashrc, which calls a function called pathmunge (!) that is changing the path for non-interactive shell access.
So your safest option is to do a re-source of the .basrc file as Humprey points out or to source a custom environment file separately so your new path will take. This last option may be a bit safer: now that we have to source a separate file anyhow, put the new environment script to source somewhere inside the /shared directory so you'll know for sure it'll stay intact through upgrades.
-Matt
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects
