This repository has been archived by the owner on Apr 19, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
skip sosetup-network when passing from sosetup to sosetup-elastic
- Loading branch information
Showing
3 changed files
with
71 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
securityonion-setup (20120912-0ubuntu0securityonion239) trusty; urgency=medium | ||
|
||
* skip sosetup-network when passing from sosetup to sosetup-elastic | ||
|
||
-- Doug Burks <[email protected]> Tue, 29 Aug 2017 12:41:41 -0400 | ||
|
||
securityonion-setup (20120912-0ubuntu0securityonion238) trusty; urgency=medium | ||
|
||
* update for elastic | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64 changes: 64 additions & 0 deletions
64
debian/patches/skip-sosetup-network-when-passing-from-sosetup-to-sosetup-elastic
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
Description: <short summary of the patch> | ||
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 <[email protected]> | ||
|
||
--- | ||
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: <vendor|upstream|other>, <url of original patch> | ||
Bug: <url in upstream bugtracker> | ||
Bug-Debian: http://bugs.debian.org/<bugnumber> | ||
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber> | ||
Forwarded: <no|not-needed|url proving that it has been forwarded> | ||
Reviewed-By: <name and email of someone who approved the patch> | ||
Last-Update: <YYYY-MM-DD> | ||
|
||
--- 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 | ||
|
||
######################################### |