Tarmo_Mamers
Nov 13, 2012Nimbostratus
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