Forum Discussion

Tarmo_Mamers's avatar
Tarmo_Mamers
Icon for Nimbostratus rankNimbostratus
Nov 13, 2012

RD ID in the CLI prompt

If you have ever wondered, which RD are you in (when working in the command line and switching between Route Domains using rdsh), add the following to your /etc/bashrc

 

getRD()

 

{

 

rd=''

 

if [ -n "$TMOS_RD" ]; then

 

rd="%$TMOS_RD"

 

fi

 

echo "$rd"

 

}

 

and update the PS1 variable definition according to your taste. For example

 

PS1='[$USER@$(getHostName):$(getPromptStatus)$(getAvcCount)$(getRD)] \W \$ '

 

The Route Domain ID will be shown in the prompt, like this

 

[admin@bigip:Active%2] config

 

2 Replies

  • Thanks for the suggestion Tarmo. I submitted a request for enhancement in SR1-83412302 to add this to the bash CLI prompt if the user switches to a non-default route domain.

     

     

    Aaron