1 |
oops - pulled that from an old system - at the end just use: |
2 |
|
3 |
";glsa-check -vt all" |
4 |
|
5 |
The first run with grep is redundant - possibly worked with the first |
6 |
glsa-check versions ... |
7 |
|
8 |
BillK |
9 |
|
10 |
|
11 |
|
12 |
On Tue, 20 08-06-10 at 11:39 +0800, W.Kenworthy wrote: |
13 |
> Put something like this in [f]crontab: |
14 |
> |
15 |
> %daily,lavg(1.5,2,2) * 3-9 root rsync --recursive --links --safe-links |
16 |
> --perms --times --compress --force --whole-file --delete --delete-after |
17 |
> --stats --timeout=180 |
18 |
> rsync://rsync.gentoo.org/gentoo-portage/metadata/glsa/* /usr/portage/metadata/glsa/ ;glsa-check -n -l|grep "\[N";glsa-check -t all |
19 |
> |
20 |
> glsa-check only does its magic on the current portage snapshot - the |
21 |
> above line rsyncs just the security stuff first. Once done, get cron to |
22 |
> mail it as here. |
23 |
> |
24 |
> BillK |
25 |
> |
26 |
> |
27 |
> On Mon, 2008-06-09 at 19:59 -0700, JD Gray wrote: |
28 |
> > I'm running the below script on my gentoo servers to email me whenever |
29 |
> > there are GLSA's affecting me. It works like a charm, but I have one |
30 |
> > beef with it. Newlines are not preserved, so I get a lovely Wall Of |
31 |
> > Text (tm) when ever it sends me the GLSA. I'm guessing this is because |
32 |
> > of the way bash handles variables. Anyone have any insight on how to |
33 |
> > correct this? |
34 |
> > |
35 |
> > #!/bin/bash |
36 |
> > |
37 |
> > /usr/bin/glsa-check -t all &> /dev/null |
38 |
> > CHECK_RESULT="`/usr/bin/glsa-check -t all 2>&1`" |
39 |
> > |
40 |
> > if [ "$CHECK_RESULT" != "" ]; then |
41 |
> > echo $CHECK_RESULT | /bin/mail -s "Frog glsa-check" kahdgarxi@×××××.com; |
42 |
> > fi |
43 |
> > |
44 |
> > Thanks in advance |
45 |
> > |
46 |
> > -JD |
47 |
-- |
48 |
gentoo-server@l.g.o mailing list |