vircmd: loosen matching of nodes in cluster if no wildcard given
authorMartin Schwenke <martin@meltin.net>
Wed, 2 Jul 2014 02:09:52 +0000 (12:09 +1000)
committerMartin Schwenke <martin@meltin.net>
Wed, 2 Jul 2014 10:26:52 +0000 (20:26 +1000)
As more node types appear this becomes unwieldy so don't be as
paranoid.

Signed-off-by: Martin Schwenke <martin@meltin.net>
vircmd

diff --git a/vircmd b/vircmd
index 704f2ca..ae20ac6 100755 (executable)
--- a/vircmd
+++ b/vircmd
@@ -89,15 +89,7 @@ nodes=""
 
 # If the cluster name doesn't have a wildcard then we need to be inventive.
 if [ "${cluster/[\[\]\?\*]/}" = "$cluster" ] ; then
-    get_nodes "${cluster}n[0-9]"
-    get_nodes "${cluster}n[0-9][0-9]"
-    get_nodes "${cluster}base[0-9]"
-    get_nodes "${cluster}base[0-9][0-9]"
-    get_nodes "${cluster}storage[0-9]"
-    get_nodes "${cluster}storage[0-9][0-9]"
-    get_nodes "${cluster}tsm"
-    get_nodes "${cluster}tsm[0-9]"
-    get_nodes "${cluster}tsm[0-9][0-9]"
+    get_nodes "${cluster}[a-z]*[0-9]"
 else
     get_nodes "$cluster"
 fi