New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add skip interactive option to soup #481

Closed
GoogleCodeExporter opened this Issue Mar 24, 2015 · 11 comments

Comments

Projects
None yet
1 participant
@GoogleCodeExporter
Copy link

GoogleCodeExporter commented Mar 24, 2015

The patch attached adds option ``-y'' to soup to skip the interactive key 
presses.
This is useful when you want to run soup from a provisioning script.

$ sudo ./soup -h

Security Onion Update

     Options:

        -h    This message
    -y  Skip interactive mode

Usage: ./soup 

$ sudo ./soup -y
Hit http://security.ubuntu.com precise-security Release.gpg
Hit http://us.archive.ubuntu.com precise Release.gpg
Get:1 http://us.archive.ubuntu.com precise-updates Release.gpg [198 B]
....

Original issue reported on code.google.com by jonsch...@gmail.com on 9 Feb 2014 at 5:55

Attachments:

@GoogleCodeExporter

This comment has been minimized.

Copy link
Author

GoogleCodeExporter commented Mar 24, 2015

Hi Jon,

Thanks for the patch!

Looks like your diff may have been done with old and new files swapped:
--- mysoup      2014-02-08 23:45:13.112203943 -0600
+++ /usr/bin/soup       2014-01-09 16:59:04.000000000 -0600

But even if I run "patch --reverse" it's not applying cleanly to the current 
version of soup.

Please re-try your patch and verify it applies cleanly to the current version.

Thanks!

Original comment by doug.bu...@gmail.com on 9 Feb 2014 at 1:24

  • Added labels: ****
  • Removed labels: ****
@GoogleCodeExporter

This comment has been minimized.

Copy link
Author

GoogleCodeExporter commented Mar 24, 2015

Sorry Doug, new file attached.

Original comment by jonsch...@gmail.com on 10 Feb 2014 at 3:00

  • Added labels: ****
  • Removed labels: ****

Attachments:

@GoogleCodeExporter

This comment has been minimized.

Copy link
Author

GoogleCodeExporter commented Mar 24, 2015

Thanks, Jon!

I've added this to the Roadmap:
https://code.google.com/p/security-onion/wiki/Roadmap

I had been thinking about an option like this for quite some time but was 
simply using the following so it was never a high priority for me:
yes | sudo soup

I like having it as an official option now.  As soon as we make it an official 
option, though, folks are going to want to put it in a cron job for automatic 
updates.  

Do we need to add any special error handling for that?  

At the very minimum, we should log all output to a log file like this:
> /var/log/nsm/soup.log.$DATETIME 2>&1

Instead of adding the above to every line that would normally output, maybe we 
just create a new wrapper script (/usr/bin/soup-auto) as follows:
/usr/bin/soup > /var/log/nsm/soup.log.$DATETIME 2>&1

Thoughts?

Original comment by doug.bu...@gmail.com on 10 Feb 2014 at 2:58

  • Added labels: ****
  • Removed labels: ****
@GoogleCodeExporter

This comment has been minimized.

Copy link
Author

GoogleCodeExporter commented Mar 24, 2015

That should've been:
/usr/bin/soup -y > /var/log/nsm/soup.log.$DATETIME 2>&1

Original comment by doug.bu...@gmail.com on 10 Feb 2014 at 3:01

  • Added labels: ****
  • Removed labels: ****
@GoogleCodeExporter

This comment has been minimized.

Copy link
Author

GoogleCodeExporter commented Mar 24, 2015

I can add an option, like -c, for cron mode where it writes the output to a 
file.
I like that, what do you think?

Original comment by jonsch...@gmail.com on 13 Feb 2014 at 4:34

  • Added labels: ****
  • Removed labels: ****
@GoogleCodeExporter

This comment has been minimized.

Copy link
Author

GoogleCodeExporter commented Mar 24, 2015

I just remembered that apt already logs to /var/log/apt (history.log and 
term.log), so maybe we don't need to do our own logging.

Original comment by doug.bu...@gmail.com on 13 Feb 2014 at 11:18

  • Added labels: ****
  • Removed labels: ****
@GoogleCodeExporter

This comment has been minimized.

Copy link
Author

GoogleCodeExporter commented Mar 24, 2015

Doug, I went ahead and modified the script to include an option for writing 
stdout and stderr to a file.
This is so the user can specify another location if they would like to do so.

$ soup -y -l /mylogs/test.log

Original comment by jonsch...@gmail.com on 18 Feb 2014 at 12:23

  • Added labels: ****
  • Removed labels: ****

Attachments:

@GoogleCodeExporter

This comment has been minimized.

Copy link
Author

GoogleCodeExporter commented Mar 24, 2015

Nice, thanks!

Original comment by doug.bu...@gmail.com on 18 Feb 2014 at 12:25

  • Added labels: ****
  • Removed labels: ****
@GoogleCodeExporter

This comment has been minimized.

Copy link
Author

GoogleCodeExporter commented Mar 24, 2015

Published:
http://blog.securityonion.net/2014/03/new-securityonion-sostat-package.html

Original comment by doug.bu...@gmail.com on 12 Mar 2014 at 11:27

  • Changed state: Verified
  • Added labels: ****
  • Removed labels: ****
@GoogleCodeExporter

This comment has been minimized.

Copy link
Author

GoogleCodeExporter commented Mar 24, 2015

Awesome.. This is what we are waiting for .. Will this be available for sosetup 
also ? 

Original comment by sanka...@gmail.com on 13 Mar 2014 at 12:18

  • Added labels: ****
  • Removed labels: ****
@GoogleCodeExporter

This comment has been minimized.

Copy link
Author

GoogleCodeExporter commented Mar 24, 2015

I was thinking about doing a command line version of sosetup but won't be able 
to allocate time to it right now.

Original comment by jonsch...@gmail.com on 13 Mar 2014 at 4:34

  • Added labels: ****
  • Removed labels: ****
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment