From e4e8f0ba6bdc1a40a1fb9763b8ae06ad1618cc38 Mon Sep 17 00:00:00 2001 From: doug Date: Tue, 29 Aug 2017 12:42:44 -0400 Subject: [PATCH] skip sosetup-network when passing from sosetup to sosetup-elastic --- debian/changelog | 6 ++ debian/patches/series | 1 + ...en-passing-from-sosetup-to-sosetup-elastic | 64 +++++++++++++++++++ 3 files changed, 71 insertions(+) create mode 100644 debian/patches/skip-sosetup-network-when-passing-from-sosetup-to-sosetup-elastic diff --git a/debian/changelog b/debian/changelog index 1391b3c..9fb7c6c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +securityonion-setup (20120912-0ubuntu0securityonion239) trusty; urgency=medium + + * skip sosetup-network when passing from sosetup to sosetup-elastic + + -- Doug Burks Tue, 29 Aug 2017 12:41:41 -0400 + securityonion-setup (20120912-0ubuntu0securityonion238) trusty; urgency=medium * update for elastic diff --git a/debian/patches/series b/debian/patches/series index 8af93b0..d881ae4 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -226,3 +226,4 @@ Issue-1111:-so-allow-analyst-mode-should-add-IP-address-to-OSSEC-whitelist inform-user-of-OSSEC-server-restart-for-so-disallow so-allowdisallow:-fix-wrong-number-of-arguments-error update-for-elastic +skip-sosetup-network-when-passing-from-sosetup-to-sosetup-elastic diff --git a/debian/patches/skip-sosetup-network-when-passing-from-sosetup-to-sosetup-elastic b/debian/patches/skip-sosetup-network-when-passing-from-sosetup-to-sosetup-elastic new file mode 100644 index 0000000..1b3615d --- /dev/null +++ b/debian/patches/skip-sosetup-network-when-passing-from-sosetup-to-sosetup-elastic @@ -0,0 +1,64 @@ +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-setup (20120912-0ubuntu0securityonion239) trusty; urgency=medium + . + * skip sosetup-network when passing from sosetup to sosetup-elastic +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-setup-20120912.orig/bin/sosetup ++++ securityonion-setup-20120912/bin/sosetup +@@ -218,7 +218,7 @@ if [ $? = 1 ]; then + fi + [ "$SETUP" == "" ] && exit + if [ "$SETUP" == "Experimental Setup" ]; then +- /usr/sbin/sosetup-elastic ++ /usr/sbin/sosetup-elastic skipnetwork + exit $? + fi + +--- securityonion-setup-20120912.orig/bin/sosetup-elastic ++++ securityonion-setup-20120912/bin/sosetup-elastic +@@ -139,6 +139,8 @@ HR_MEM=$((TOTAL_MEM / 1000)) + MEM_TEXT="This machine currently has "$HR_MEM"GB of RAM allocated.\n\For best performance, please ensure the machine is allocated at least 3GB of RAM.\n\n\Please consult the following link for more information:\n\https://github.com/Security-Onion-Solutions/security-onion/wiki/Hardware\n\n\ + Click 'No' to stop setup and adjust the amount of RAM allocated to this machine.\n\ + Otherwise, click 'Yes' to continue." ++ARGS=("$@") ++ + ######################################### + # Debug + ######################################### +@@ -196,11 +198,11 @@ fi + ######################################### + # sosetup-network + ######################################### +-if [ -z "$WRITEANSWERFILE" ]; then # Network config not yet supported when generating an answer file +-[ -f /usr/sbin/sosetup-network ] && /usr/sbin/sosetup-network +-ANSWER="$?" +-# If there were errors in sosetup-network, then exit +-[ $ANSWER -eq 1 ] && exit ++# Network config not yet supported when generating an answer file ++if [ -z "$WRITEANSWERFILE" ] && [ "${ARGS[0]}" != "skipnetwork" ] && [ -f /usr/sbin/sosetup-network ]; then ++ /usr/sbin/sosetup-network ++ # If there were errors in sosetup-network, then exit ++ [ $? -eq 1 ] && exit + fi + + #########################################