Commit 7270ae715f2af909f73e60fcada6cb1e585963bb

Authored by lucvic
1 parent 50e5d926

Added -h option

Showing 1 changed file with 6 additions and 1 deletions
cluster-manager.sh
@@ -103,11 +103,15 @@ HOSTLIST=( @@ -103,11 +103,15 @@ HOSTLIST=(
103 # OPTION PROCESSING 103 # OPTION PROCESSING
104 # 104 #
105 105
106 -OPTIONS=$(getopt -o s: -- $@) 106 +OPTIONS=$(getopt -o s:h: -- $@)
107 eval set -- $OPTIONS 107 eval set -- $OPTIONS
108 108
109 while true; do 109 while true; do
110 case "$1" in 110 case "$1" in
  111 + -h)
  112 + IFS=',' read -a HOSTLIST <<< "$2"
  113 + shift 2
  114 + ;;
111 -s) 115 -s)
112 SSH_USER="${2}@" 116 SSH_USER="${2}@"
113 shift 2 117 shift 2
@@ -239,6 +243,7 @@ case &quot;$ACTION&quot; in @@ -239,6 +243,7 @@ case &quot;$ACTION&quot; in
239 echo " " 243 echo " "
240 echo "List of options:" 244 echo "List of options:"
241 echo " -s <ssh_login>" 245 echo " -s <ssh_login>"
  246 + echo " -h <hostname,hostname,...>"
242 ;; 247 ;;
243 248
244 *) 249 *)