|
@ -58,8 +58,18 @@ __prompt_command() { |
|
|
|
|
|
|
|
|
PS1='' |
|
|
PS1='' |
|
|
|
|
|
|
|
|
#check LXC container name and type |
|
|
|
|
|
#PS1="${Red}PROD2 ${Yel}\u${R}" |
|
|
|
|
|
|
|
|
if [[ $container == 'lxc' ]];then |
|
|
|
|
|
PS1+="${Gra}[LXC:${R}" |
|
|
|
|
|
local host=$container_hostname |
|
|
|
|
|
case ${host:0:4} in |
|
|
|
|
|
'beta') |
|
|
|
|
|
PS1+="${Ora}";; |
|
|
|
|
|
'prod') |
|
|
|
|
|
PS1+="${Red}";; |
|
|
|
|
|
*) |
|
|
|
|
|
esac |
|
|
|
|
|
PS1+="${host}${Gra}] " |
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
if [ `id -u` -eq 0 ]; then |
|
|
if [ `id -u` -eq 0 ]; then |
|
|
PS1+="${Red}\u${R}" |
|
|
PS1+="${Red}\u${R}" |
|
|