Last active
August 3, 2016 20:04
-
-
Save cdemers/b064d16354bcb84fa75747e8c72448c7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This bashrc is aimed at clustered CoreOS marchines running on | |
# VMware. It will display the IP of the ens192 VMware interface | |
# in the prompt, which is useful to identify the host in a cattle | |
# type cluster. | |
if [[ $- != *i* ]] ; then | |
# Shell is non-interactive. Be done now! | |
return | |
fi | |
source ../../usr/share/skel/.bashrc | |
if [ "${HOSTNAME:(-5):1}" == "-" ]; then | |
HASH=${HOSTNAME:(-4)} | |
else | |
HASH=Master | |
fi | |
IP=`ifconfig ens192 | awk '/^\s+inet\s(.+..+..+..+).*/{ print $2 }'` | |
export PS1="\[\033[01;32m\]\u@$IP:$HASH\[\033[01;34m\] \w \$\[\033[00m\] " | |
alias dockershell="docker run --rm -ti ubuntu:14.04 /bin/bash" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment