Browse Source

lxc container

master
pvincent 5 years ago
parent
commit
f2c10f1daf
  1. 14
      bash.bashrc

14
bash.bashrc

@ -58,8 +58,18 @@ __prompt_command() {
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
PS1+="${Red}\u${R}"

Loading…
Cancel
Save