]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
app-layer setup scripts: enable new modules on copy 1699/head
authorJason Ish <ish@unx.ca>
Thu, 8 Oct 2015 21:20:25 +0000 (15:20 -0600)
committerVictor Julien <victor@inliniac.net>
Tue, 20 Oct 2015 17:12:50 +0000 (19:12 +0200)
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
scripts/setup-app-layer-logger.sh
scripts/setup-app-layer.sh

index ef3b741e7f4bdca61a0060d7c43409186a747d73..ef4bccaa8e9fc12995aed8c1b2770981ad0556b3 100755 (executable)
@@ -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() {
index 8b53ae545384ea32b0079c9b70f2974544d76bda..13342412ed949f257c1ac77113c8747129e8e6f5 100755 (executable)
@@ -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() {
index b24b5e6195d861304701716108f5be7fe994fa73..2789f20dd7cdadb36934624db792c42e44d2dec6 100755 (executable)
@@ -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 {