title: How to detect which server I am using in .bash_profile and apply settings accordingly
body: <p>I have a few virtual machines running Fedora 20 and one NAS box from which the HOME directories are mounted on all VMs. It works great as users have to maintain one copy of git settings, VNC settings SSH keys and so on. The problem is that regardless of whichever VM they use they always use the same .bash_profile which references always the same .bashrc. I say it's a problem because I want to apply some settings in there on per user basis but only for one specific VM. To be specific I want to change umask for few users on one specific isolated server.</p>
  
  <p>So I thought there must be a way to conditionally load some settings through .bash_profile depending on the IP/hostname of the server.</p>
  
  <p>I thought, just like .bash_profile references .bashrc I could reference another file with this setting which only exists on the server it will affect. Not the other servers this reference would not be valid. This is not an elegant solution, it would throw errors. </p>
  
  <p>I've tried googling this and the results usually point me to stackoverflow where somebody had a similar question but this time I couldn't find anything.</p>
  
  <p>Does somebody have an idea how to solve this?</p>
  
  <p>Thanks in advance for any help.</p>