aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuis Rascao <[email protected]>2018-08-09 00:25:59 +0100
committerLuis Rascao <[email protected]>2018-10-11 11:20:01 +0100
commit3d82071245e1c658eef0e70bae297a574c07e6d9 (patch)
treecb2c7734ecded60af3d113e32df2bde62b293752
parentbb8af6ddec20f44599f7cd0c3e626996a3206dad (diff)
downloadrelx-3d82071245e1c658eef0e70bae297a574c07e6d9.tar.gz
relx-3d82071245e1c658eef0e70bae297a574c07e6d9.tar.bz2
relx-3d82071245e1c658eef0e70bae297a574c07e6d9.zip
Capture internal start script arguments
-rwxr-xr-xpriv/templates/extended_bin30
1 files changed, 30 insertions, 0 deletions
diff --git a/priv/templates/extended_bin b/priv/templates/extended_bin
index 78f25e0..57f4cac 100755
--- a/priv/templates/extended_bin
+++ b/priv/templates/extended_bin
@@ -312,6 +312,16 @@ relx_run_hooks() {
done
}
+relx_disable_hooks() {
+ PRE_START_HOOKS=""
+ POST_START_HOOKS=""
+ PRE_STOP_HOOKS=""
+ POST_STOP_HOOKS=""
+ PRE_INSTALL_UPGRADE_HOOKS=""
+ POST_INSTALL_UPGRADE_HOOKS=""
+ STATUS_HOOK=""
+}
+
relx_is_extension() {
EXTENSION=$1
case "$EXTENSION" in
@@ -346,6 +356,26 @@ relx_run_extension() {
[ "$SCRIPT_DIR/$EXTENSION_SCRIPT" ] && . "$SCRIPT_DIR/$EXTENSION_SCRIPT" $@
}
+# given a list of arguments, identify the internal ones
+# --relx-disable-hooks
+# and process them accordingly
+process_internal_args() {
+ for arg in $@
+ do
+ shift
+ case "$arg" in
+ --relx-disable-hooks)
+ relx_disable_hooks
+ ;;
+ *)
+ ;;
+ esac
+ done
+}
+
+# process internal arguments
+process_internal_args $@
+
find_erts_dir
export ROOTDIR="$RELEASE_ROOT_DIR"
export BINDIR="$ERTS_DIR/bin"