Put something like this in [f]crontab: %daily,lavg(1.5,2,2) * 3-9 root rsync --recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 rsync://rsync.gentoo.org/gentoo-portage/metadata/glsa/* /usr/portage/metadata/glsa/ ;glsa-check -n -l|grep "\[N";glsa-check -t all
glsa-check only does its magic on the current portage snapshot - the above line rsyncs just the security stuff first. Once done, get cron to mail it as here. BillK On Mon, 2008-06-09 at 19:59 -0700, JD Gray wrote: > I'm running the below script on my gentoo servers to email me whenever > there are GLSA's affecting me. It works like a charm, but I have one > beef with it. Newlines are not preserved, so I get a lovely Wall Of > Text (tm) when ever it sends me the GLSA. I'm guessing this is because > of the way bash handles variables. Anyone have any insight on how to > correct this? > > #!/bin/bash > > /usr/bin/glsa-check -t all &> /dev/null > CHECK_RESULT="`/usr/bin/glsa-check -t all 2>&1`" > > if [ "$CHECK_RESULT" != "" ]; then > echo $CHECK_RESULT | /bin/mail -s "Frog glsa-check" [EMAIL PROTECTED]; > fi > > Thanks in advance > > -JD -- [email protected] mailing list
