Add stack phases to extras.d handling
Add hooks to stack.sh, unstack.sh and clean.sh to call the extras.d
scripts at multiple points in stack.sh. This allows these scripts to
perform installation and startup tasks at similar times as they would
if integrated into stack.sh.
extras.d/70-tempest.sh is present as an example of the structure
of these scripts.
See extras.d/README.md for more information.
Change-Id: Ic1fe522559b94d204d6c0319a2e3d23684c8d028
diff --git a/unstack.sh b/unstack.sh
index c944ccc..67c8b7c 100755
--- a/unstack.sh
+++ b/unstack.sh
@@ -42,6 +42,16 @@
source $TOP_DIR/lib/ironic
source $TOP_DIR/lib/trove
+# Extras Source
+# --------------
+
+# Phase: source
+if [[ -d $TOP_DIR/extras.d ]]; then
+ for i in $TOP_DIR/extras.d/*.sh; do
+ [[ -r $i ]] && source $i source
+ done
+fi
+
# Determine what system we are running on. This provides ``os_VENDOR``,
# ``os_RELEASE``, ``os_UPDATE``, ``os_PACKAGE``, ``os_CODENAME``
GetOSVersion
@@ -53,6 +63,7 @@
# Run extras
# ==========
+# Phase: unstack
if [[ -d $TOP_DIR/extras.d ]]; then
for i in $TOP_DIR/extras.d/*.sh; do
[[ -r $i ]] && source $i unstack