Skip to content

Commit

Permalink
modified append-cluster name to handle subdirectories of user home di…
Browse files Browse the repository at this point in the history
…rectories properly

Example:
/user/hive/subdir -> /user/hive-cluster/subdir
  • Loading branch information
sile16 committed Jun 28, 2016
1 parent e16ec9e commit 1be5074
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion onefs/isilon_create_directories.sh
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,10 @@ for direntry in ${dirList[*]}; do
read -a specs <<<"$(echo $direntry | sed 's/#/ /g')"

if [[ ${specs[0]} == /user/* ]] ; then
specs[0]="${specs[0]}$CLUSTER_NAME"
IFS='/' read -a path <<<"${specs[0]}"
old_path="/user/${path[2]}"
new_path="/user/${path[2]}$CLUSTER_NAME"
specs[0]="${specs[0]/$old_path/$new_path}"
fi
specs[2]="${specs[2]}$CLUSTER_NAME"
specs[3]="${specs[3]}$CLUSTER_NAME"
Expand Down

0 comments on commit 1be5074

Please sign in to comment.