diff --git a/debian/changelog b/debian/changelog index d056424..be488e3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +securityonion-nsmnow-admin-scripts (20120724-0ubuntu0securityonion133) trusty; urgency=medium + + * Issue 924: NSM: set DEBUG 1 in /etc/sguild/sguild.conf + + -- Doug Burks Sat, 21 May 2016 06:12:40 -0400 + securityonion-nsmnow-admin-scripts (20120724-0ubuntu0securityonion132) trusty; urgency=medium * fix postinst to run mysql with --defaults-file diff --git a/debian/patches/Issue-924:-NSM:-set-DEBUG-1-in-etcsguildsguild.conf b/debian/patches/Issue-924:-NSM:-set-DEBUG-1-in-etcsguildsguild.conf new file mode 100644 index 0000000..6049f96 --- /dev/null +++ b/debian/patches/Issue-924:-NSM:-set-DEBUG-1-in-etcsguildsguild.conf @@ -0,0 +1,36 @@ +Description: + TODO: Put a short summary on the line above and replace this paragraph + with a longer explanation of this change. Complete the meta-information + with other relevant fields (see below for details). To make it easier, the + information below has been extracted from the changelog. Adjust it or drop + it. + . + securityonion-nsmnow-admin-scripts (20120724-0ubuntu0securityonion133) trusty; urgency=medium + . + * Issue 924: NSM: set DEBUG 1 in /etc/sguild/sguild.conf +Author: Doug Burks + +--- +The information above should follow the Patch Tagging Guidelines, please +checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here +are templates for supplementary fields that you might want to add: + +Origin: , +Bug: +Bug-Debian: http://bugs.debian.org/ +Bug-Ubuntu: https://launchpad.net/bugs/ +Forwarded: +Reviewed-By: +Last-Update: + +--- securityonion-nsmnow-admin-scripts-20120724.orig/usr/sbin/nsm_server_add ++++ securityonion-nsmnow-admin-scripts-20120724/usr/sbin/nsm_server_add +@@ -327,7 +327,7 @@ cat >/etc/nsm/$SERVER_NAME/sguild.conf < + set SGUILD_LIB_PATH "${SERVER_LIB_DIR}" + + # DEBUG 0=off 1=important stuff 2=everything. Option 2 is VERY chatty. +-set DEBUG 2 ++set DEBUG 1 + + # Run sguild in daemon mode. 1=on 0=off + # This overrides above and will set DEBUG off. diff --git a/debian/patches/series b/debian/patches/series index 7bb8313..5e20a69 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -126,3 +126,4 @@ check-for-snorby-output-before-trying-to-disable Issues-853-854-855 Issue-#859:-NSM:-mkdir--p-varrunnsm-before-trying-to-chown NSM:-Squert-object_mappings-table-has-wrong-permissions-#866 +Issue-924:-NSM:-set-DEBUG-1-in-etcsguildsguild.conf diff --git a/debian/postinst b/debian/postinst index a3f9b98..37a4cf9 100644 --- a/debian/postinst +++ b/debian/postinst @@ -29,6 +29,16 @@ case "$1" in mysql --defaults-file=/etc/mysql/debian.cnf -N -B -e "GRANT INSERT,UPDATE ON securityonion_db.object_mappings TO 'readonly'@'localhost';" || echo "Error updating permissions on Squert object_mappings." fi + # change sguild debug to 1 + FILE='/etc/sguild/sguild.conf' + if [ -f $FILE ]; then + if grep "set DEBUG 2" $FILE >/dev/null 2>&1; then + echo "Sguild DEBUG is currently set to 2." + echo "Setting sguild DEBUG to 1." + sed -i 's|set DEBUG 2|set DEBUG 1|g' $FILE || echo "Error updating $FILE" + fi + fi + ;; abort-upgrade|abort-remove|abort-deconfigure) diff --git a/usr/sbin/nsm_server_add b/usr/sbin/nsm_server_add index 68f0185..4f71bb7 100755 --- a/usr/sbin/nsm_server_add +++ b/usr/sbin/nsm_server_add @@ -327,7 +327,7 @@ cat >/etc/nsm/$SERVER_NAME/sguild.conf << EOF_SGUILD set SGUILD_LIB_PATH "${SERVER_LIB_DIR}" # DEBUG 0=off 1=important stuff 2=everything. Option 2 is VERY chatty. -set DEBUG 2 +set DEBUG 1 # Run sguild in daemon mode. 1=on 0=off # This overrides above and will set DEBUG off.