From dc2c8967819fc1e60cbc992c85893e166617f8fc Mon Sep 17 00:00:00 2001 From: Jason Ish Date: Thu, 8 Oct 2015 15:20:25 -0600 Subject: [PATCH] app-layer setup scripts: enable new modules on copy The templates are disabled by default, enable the copy of the template so the new app-layer modules are enabled by by default. --- scripts/setup-app-layer-detect.sh | 6 ++++-- scripts/setup-app-layer-logger.sh | 6 ++++-- scripts/setup-app-layer.sh | 6 ++++-- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/scripts/setup-app-layer-detect.sh b/scripts/setup-app-layer-detect.sh index ef3b741e7f..ef4bccaa8e 100755 --- a/scripts/setup-app-layer-detect.sh +++ b/scripts/setup-app-layer-detect.sh @@ -34,9 +34,11 @@ function copy_template_file() { echo "Creating ${dst}." - sed -e "s/TEMPLATE/${protoname_upper}/g" \ + sed -e '/TEMPLATE_START_REMOVE/,/TEMPLATE_END_REMOVE/d' \ + -e "s/TEMPLATE/${protoname_upper}/g" \ -e "s/template/${protoname_lower}/g" \ - -e "s/Template/${protoname}/g" > ${dst} < ${src} + -e "s/Template/${protoname}/g" \ + > ${dst} < ${src} } function copy_templates() { diff --git a/scripts/setup-app-layer-logger.sh b/scripts/setup-app-layer-logger.sh index 8b53ae5453..13342412ed 100755 --- a/scripts/setup-app-layer-logger.sh +++ b/scripts/setup-app-layer-logger.sh @@ -38,9 +38,11 @@ function copy_template_file() { echo "Creating ${dst}." - sed -e "s/TEMPLATE/${protoname_upper}/g" \ + sed -e '/TEMPLATE_START_REMOVE/,/TEMPLATE_END_REMOVE/d' \ + -e "s/TEMPLATE/${protoname_upper}/g" \ -e "s/template/${protoname_lower}/g" \ - -e "s/Template/${protoname}/g" > ${dst} < ${src} + -e "s/Template/${protoname}/g" \ + > ${dst} < ${src} } function copy_templates() { diff --git a/scripts/setup-app-layer.sh b/scripts/setup-app-layer.sh index b24b5e6195..2789f20dd7 100755 --- a/scripts/setup-app-layer.sh +++ b/scripts/setup-app-layer.sh @@ -37,9 +37,11 @@ function copy_template_file() { echo "Creating ${dst}." - sed -e "s/TEMPLATE/${protoname_upper}/g" \ + sed -e '/TEMPLATE_START_REMOVE/,/TEMPLATE_END_REMOVE/d' \ + -e "s/TEMPLATE/${protoname_upper}/g" \ -e "s/template/${protoname_lower}/g" \ - -e "s/Template/${protoname}/g" > ${dst} < ${src} + -e "s/Template/${protoname}/g" \ + > ${dst} < ${src} } function copy_app_layer_templates {