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