From 30bfdb11b2abdb90e59fa49815f6ef653eb5c211 Mon Sep 17 00:00:00 2001 From: Joe Hunkeler Date: Thu, 30 Jan 2014 21:14:08 +0000 Subject: Updated shell setup --- README | 44 +++++++++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 19 deletions(-) diff --git a/README b/README index 8835f3d..3b49667 100644 --- a/README +++ b/README @@ -1,31 +1,37 @@ -1. Put multihome in your path +1. Put multihome in your path (i.e. ~/bin) 2. Depending on your shell, put the following at the top of its initialization file. CSH (.cshrc): -if ( -f ~/bin/multihome ) then - # Destroy environment - env -i - # Resassign HOME - eval `~/bin/multihome` - if ( -d $HOME ) then - cd $HOME - endif - source ~/.cshrc +setenv PATH ${HOME}/bin:${PATH} +set MULTIHOME=`which multihome` +if ( -x $MULTIHOME ) then + # Destroy environment + env -i + # Resassign HOME + eval `$MULTIHOME` + if ( "$HOME" != "$HOME_ORIG" ) then + cd $HOME + source ~/.cshrc + endif endif BASH (.bash_profile): -if [ -f ~/bin/multihome ]; then - # Destroy environment - env -i - # Resassign HOME - eval `~/bin/multihome` - if [ -d "$HOME" ]; then - cd $HOME - fi - source ~/.bash_profile +export PATH=$HOME/bin:$PATH +MULTIHOME=`which multihome` +if [ -x $MULTIHOME ]; then + HOME_ORIG=$HOME + # Destroy environment + env -i + # Resassign HOME + eval `$MULTIHOME` + if [[ "$HOME" != "$HOME_ORIG" ]]; then + cd $HOME + source ~/.bash_profile + fi fi + -- cgit From 05516585c69fcc3376e49f552bf534cf2ddd04ec Mon Sep 17 00:00:00 2001 From: Joe Hunkeler Date: Thu, 30 Jan 2014 21:55:57 +0000 Subject: Add .homerc information --- README | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/README b/README index 3b49667..1da404c 100644 --- a/README +++ b/README @@ -2,7 +2,7 @@ 2. Depending on your shell, put the following at the top of its initialization file. -CSH (.cshrc): +CSH (/home/$USER/.cshrc): setenv PATH ${HOME}/bin:${PATH} set MULTIHOME=`which multihome` @@ -18,7 +18,7 @@ if ( -x $MULTIHOME ) then endif -BASH (.bash_profile): +BASH (/home/$USER/.bash_profile): export PATH=$HOME/bin:$PATH MULTIHOME=`which multihome` @@ -35,3 +35,29 @@ if [ -x $MULTIHOME ]; then fi +Custom Configuration (/home/$USER/.homerc): + +1. cluster_force=true|false +Type: Boolean +Default: false +Description: + Setting this "true" creates a stand-alone home directory for every machine under the "standard" cluster directory. +Example: + None + + +2. clusters=( host_pattern [host_pattern ... ] ) +Type: Array +Default: Empty +Description: + Hostname substrings that denote particular clusters +Example: +cluster=( ops dev test prod ) + + +3. transfer_env=( file [file ...] ) +Type: Array +Default: .*profile .*login .*cshrc* .bash* .ssh .Xauthority +Description: + Files and/or directories to be copied from /home/$USER into the new home structure. + These files are *NOT* linked back to /home/$USER. *All* modifications are independent for each home directory. -- cgit From b2fe4220a089b69ffc6190adb085a37ef2a515ca Mon Sep 17 00:00:00 2001 From: Joe Hunkeler Date: Thu, 30 Jan 2014 22:10:42 +0000 Subject: Cleanup --- README | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/README b/README index 1da404c..c442403 100644 --- a/README +++ b/README @@ -1,4 +1,6 @@ -1. Put multihome in your path (i.e. ~/bin) +## Installation ## +1. Place multihome in your path (i.e. ~/bin) + 2. Depending on your shell, put the following at the top of its initialization file. @@ -35,7 +37,12 @@ if [ -x $MULTIHOME ]; then fi -Custom Configuration (/home/$USER/.homerc): +## Configuration ## + +1. Create /home/$USER/.homerc file + + +### Options for .homerc ### 1. cluster_force=true|false Type: Boolean @@ -43,7 +50,7 @@ Default: false Description: Setting this "true" creates a stand-alone home directory for every machine under the "standard" cluster directory. Example: - None + cluster_force=false 2. clusters=( host_pattern [host_pattern ... ] ) @@ -52,7 +59,7 @@ Default: Empty Description: Hostname substrings that denote particular clusters Example: -cluster=( ops dev test prod ) + cluster=( ops dev test prod ) 3. transfer_env=( file [file ...] ) @@ -61,3 +68,5 @@ Default: .*profile .*login .*cshrc* .bash* .ssh .Xauthority Description: Files and/or directories to be copied from /home/$USER into the new home structure. These files are *NOT* linked back to /home/$USER. *All* modifications are independent for each home directory. +Example: + transfer_env=( .*profile .*login .*cshrc* .bash* .ssh .Xauthority ) -- cgit