summaryrefslogtreecommitdiffstats
path: root/autocluster
diff options
context:
space:
mode:
Diffstat (limited to 'autocluster')
-rwxr-xr-xautocluster8
1 files changed, 6 insertions, 2 deletions
diff --git a/autocluster b/autocluster
index 147670e..f3f0552 100755
--- a/autocluster
+++ b/autocluster
@@ -408,8 +408,12 @@ expand_nodes ()
local count=$((${node_count[$node_type]:-0} + 1))
node_count[$node_type]=$count
local fmt
- fmt=$(call_func node_name_format "$node_type") || \
- die "Node type \"${node_type}\" not defined!!!"
+ fmt=$(call_func node_name_format "$node_type") || {
+ echo "ERROR: Node type \"${node_type}\" not defined!"
+ echo "Valid node types are:"
+ set | sed -n 's@^node_name_format_\(.*\) ().*@ \1@p'
+ exit 1
+ }
# printf behaves weirdly if given too many args for format, so
# "head" handles the case where there is no %d or similar for
# $count.