summaryrefslogtreecommitdiffstats
path: root/autocluster
diff options
context:
space:
mode:
authorMartin Schwenke <martin@meltin.net>2014-06-20 15:35:59 +1000
committerMartin Schwenke <martin@meltin.net>2014-07-02 14:17:17 +1000
commit5bede7898ff160163c41c278314590fc609a3ad4 (patch)
tree16b6b04571ac14757e151f22d21fab45db77d867 /autocluster
parente88cf72bed4220cd3d9636ad35311335b7d06a0f (diff)
downloadautocluster-5bede7898ff160163c41c278314590fc609a3ad4.tar.gz
autocluster-5bede7898ff160163c41c278314590fc609a3ad4.tar.xz
autocluster-5bede7898ff160163c41c278314590fc609a3ad4.zip
Add new function announce() to print a header for an action
Signed-off-by: Martin Schwenke <martin@meltin.net>
Diffstat (limited to 'autocluster')
-rwxr-xr-xautocluster9
1 files changed, 9 insertions, 0 deletions
diff --git a/autocluster b/autocluster
index 77a79a3..a003980 100755
--- a/autocluster
+++ b/autocluster
@@ -88,6 +88,14 @@ die () {
fi
}
+announce ()
+{
+ echo "######################################################################"
+ printf "# %-66s #\n" "$*"
+ echo "######################################################################"
+ echo ""
+}
+
###############################
# Indirectly call a function named by ${1}_${2}
@@ -474,6 +482,7 @@ cluster_create ()
{
# Use $1. If not set then use value from configuration file.
CLUSTER="${1:-${CLUSTER}}"
+ announce "cluster create \"${CLUSTER}\""
[ -n "$CLUSTER" ] || die "\$CLUSTER not set"
sanity_check_cluster_name