i'd like to run glsa-check from cron - this way i would automatically receive an email when glsa-check finds my systems vulnerable... currently i would receive email whenever glsa-check is run. my very first python patch will be attached in a second.
Created attachment 113216 [details] add_--quiet_option.diff this is against version 0.7 (gentoolkit-0.2.3) thank you for glsa-check (and all the other stuff:)!
glsa-check -q -l affected works but glsa-check -q -l affected doesn't could you also add the functionality for --mail option? Developers - please include this patch - this will be really useful for cron checking GLSA vulnerabilities! Thanks.
(In reply to comment #2) > but glsa-check -q -l affected doesn't I mean glsa-check -q -m affected
(In reply to comment #2) > glsa-check -q -l affected works > but glsa-check -q -m affected doesn't > could you also add the functionality for --mail option? Define "doesn't work"
(In reply to comment #4) > (In reply to comment #2) > > glsa-check -q -l affected works > > but glsa-check -q -m affected doesn't > > could you also add the functionality for --mail option? > > Define "doesn't work" > but glsa-check -q -m did not suppress output to mail body. Mail get send with 0 vulnerabilities if system is not affected. Would be good if mail won't be sent in such case at all, but only in case there are some vulnerabilities.
Looks like my previous post wasn't clear enough. I will rephrase what I want of using -m and -q options simultaneously. So I have set up 'glsa-check -q -m affected' in cron. I want to receive some report to my mail in case I have some GLSA vulnerabilities, but if there are no such - don't send mail at all. Hope this is clear. Sorry for my English.
In what way would using -q differ from the below? cat /etc/cron.weekly/glsacheck.sh #!/bin/bash mount -o remount,rw /usr /usr/bin/emerge -q --sync mount -o remount,ro /usr /usr/bin/glsa-check -t new echo "Done!"
Created attachment 140898 [details, diff] Patch to enable a -e option: behaves like -m, except silent on nothing to report I also wanted similar functionality, however I did not want to affect the -m option in case people were reassured by having a blank e-mail stating no glsa advisories. -e functions exactly the same as -m, however it only e-mails if there are items to report. Just submitting another alternative.
Hrmm. I meant to attach this patch to this bug: http://bugs.gentoo.org/show_bug.cgi?id=182990 However apparently I was navigating to the wrong place. Apologies - however I think this patch might solve what Vanya was looking for as well. (I can't figure out how to remove said attachment, so I'm coming up with reasons for it's being here. :) ) Sorry!
Is it just me or this patch is an "anti-patch"? :-) Looks like it removes the functionality, not adding ;) Anyway, the feature is still good to include...
gentoolkit-0.2.4.4 and gentoolkit-0.3.0_rc6 released.