blob: d8962e459ce6e51f10a7a9644e9c271ec20afe6d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
|
## 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.
CSH (/home/$USER/.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 (/home/$USER/.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
## Configuration ##
1. Create /home/$USER/.homerc file
### Options for .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:
cluster_force=false
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.
Example:
transfer_env=( .*profile .*login .*cshrc* .bash* .ssh .Xauthority )
4. transfer_env_custom["hostname"] = "file [file ...]"
Type: Associative Array
Default: Empty
Description:
Copies files/directories to specific hosts. Unlike transfer_env, which searches /home/$USER, transfer_env_custom may
copy files from anywhere. Use absolute paths (i.e. /path/to/file/or/dir, or ~/file/or/directory).
Example:
transfer_env_custom["server1"]="~/foo/configA /srv/foo/configB $FOO/bar"
transfer_env_custom["server2"]="~/bar/foo/configA /srv/bar/configB $BAR/foo"
5. transfer_env_HOSTNAME_always=true|false
Type: Boolean
Default: false
Description:
Always copy files/directories defined by transfer_env_custom
Example:
transfer_env_server1_always=false
6. transfer_env_always=true|false
Type: Boolean
Default: false
Description:
Always copy files/directories defined by transfer_env
Example:
transfer_env_always=false
|