[Pkg-ossec-devel] [pkg-ossec] 01/01: Moved a part of the ossec-hids-local.postinst configuration code to ossec-hids-local.config .

Jose Antonio Quevedo Muñoz jaqm-guest at moszumanska.debian.org
Wed Feb 26 17:28:27 UTC 2014


This is an automated email from the git hooks/post-receive script.

jaqm-guest pushed a commit to branch master
in repository pkg-ossec.

commit 49d0734fd26052972b5045dc942d21dafe818855
Author: Jose Antonio Quevedo <joseantonio.quevedo at gmail.com>
Date:   Wed Feb 26 18:24:33 2014 +0100

    Moved a part of the ossec-hids-local.postinst configuration code to ossec-hids-local.config .
---
 debian/ossec-hids-local.config   | 19 +++++++++++++++++++
 debian/ossec-hids-local.postinst |  3 +++
 2 files changed, 22 insertions(+)

diff --git a/debian/ossec-hids-local.config b/debian/ossec-hids-local.config
new file mode 100755
index 0000000..7da8606
--- /dev/null
+++ b/debian/ossec-hids-local.config
@@ -0,0 +1,19 @@
+#!/bin/sh -e
+
+test $DEBIAN_SCRIPT_DEBUG && set -v -x
+. /usr/share/debconf/confmodule
+
+# TODO 
+#  - configure the results in the configuration file
+#  - setup active response (firewall response, whitelist, etc.)
+db_get ossec-hids-local/enable_email || true;	EMAIL="$RET"
+db_get ossec-hids-local/email_to     || true;	EMAIL_TO="$RET"
+db_get ossec-hids-local/email_server || true;	EMAIL_SERVER="$RET"
+db_get ossec-hids-local/enable_syslog ||  true; SYSLOG="$RET"
+# Failsafe in case the values above are blank (jfs)
+[ -z "$EMAIL" ] && EMAIL="no"
+[ -z "$EMAIL_TO" ] && EMAIL_TO="root at localhost"
+[ -z "$EMAIL_SERVER" ] && EMAIL_SERVER="127.0.0.1"
+[ -z "$SYSLOG" ] && SYSLOG="no"
+db_stop
+
diff --git a/debian/ossec-hids-local.postinst b/debian/ossec-hids-local.postinst
index 8cef7f5..32a7a1a 100644
--- a/debian/ossec-hids-local.postinst
+++ b/debian/ossec-hids-local.postinst
@@ -37,6 +37,8 @@ case "$1" in
         # TODO 
         #  - configure the results in the configuration file
         #  - setup active response (firewall response, whitelist, etc.)
+
+	### Next code is commented because it was moved to ossec-hids-local.config
 	db_get ossec-hids-local/enable_email || true;	EMAIL="$RET"
 	db_get ossec-hids-local/email_to     || true;	EMAIL_TO="$RET"
 	db_get ossec-hids-local/email_server || true;	EMAIL_SERVER="$RET"
@@ -49,6 +51,7 @@ case "$1" in
 	[ -z "$SYSLOG" ] && SYSLOG="no"
 
 	db_stop
+	###
 
         # TODO - configure the configuration file
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ossec/pkg-ossec.git



More information about the Pkg-ossec-devel mailing list