diff options
Diffstat (limited to 'framework/src/suricata/scripts')
-rwxr-xr-x | framework/src/suricata/scripts/setup-app-layer-detect.sh | 6 | ||||
-rwxr-xr-x | framework/src/suricata/scripts/setup-app-layer-logger.sh | 8 | ||||
-rwxr-xr-x | framework/src/suricata/scripts/setup-app-layer.sh | 6 |
3 files changed, 13 insertions, 7 deletions
diff --git a/framework/src/suricata/scripts/setup-app-layer-detect.sh b/framework/src/suricata/scripts/setup-app-layer-detect.sh index ef3b741e..ef4bccaa 100755 --- a/framework/src/suricata/scripts/setup-app-layer-detect.sh +++ b/framework/src/suricata/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/framework/src/suricata/scripts/setup-app-layer-logger.sh b/framework/src/suricata/scripts/setup-app-layer-logger.sh index be32c393..13342412 100755 --- a/framework/src/suricata/scripts/setup-app-layer-logger.sh +++ b/framework/src/suricata/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() { @@ -62,7 +64,7 @@ function patch_makefile_am() { ed -s ${filename} > /dev/null <<EOF /output-json-template.c t- -s/template/${protoname_lower}/ +s/template/${protoname_lower}/g w EOF } diff --git a/framework/src/suricata/scripts/setup-app-layer.sh b/framework/src/suricata/scripts/setup-app-layer.sh index b24b5e61..2789f20d 100755 --- a/framework/src/suricata/scripts/setup-app-layer.sh +++ b/framework/src/suricata/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 { |