Gentoo Archives: gentoo-user

From: Alan McKinnon <alan@××××××××××××××××.za>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Sync and glsa-check from cron
Date: Wed, 20 Jun 2007 07:53:35
Message-Id: 200706200950.04344.alan@linuxholdings.co.za
In Reply to: [gentoo-user] Sync and glsa-check from cron by Nick
1 On Wednesday 20 June 2007, Nick wrote:
2 > Hi there,
3 >
4 > I'm planning to set my mother up with a very simple gentoo box, with
5 > only what she needs etc.
6 >
7 > Ideally it should require almost no interaction from me, and just
8 > keep itself working and secure.
9 >
10 > So, I'm planning to run "sudo emerge --sync" and "sudo glsa-check -f
11 > new" from a cron job, perhaps once a week.
12 >
13 > I can set up the sudoers part all fine, but is there anything I
14 > should watch out for / consider when running these maintenance tools
15 > from a cron job?
16
17 Why bother with sudo and /etc/sudoers? That's just an extra layer of
18 unnecessary complexity. The usual assortment of cron daemons can all
19 run commands as root. Write a script to run the commands you want, copy
20 it to /etc/cron.d/weekly. It will run at 4:22 am every Sunday.
21
22 Log in as root, crontab -e also works. As does sudo crontab -e
23
24 You'll have to be aware of the usuaal limitations of cron jobs - they do
25 not run under bash, and they seldom have the same environment variables
26 set as what a r\egular user gets. So always include full paths to any
27 command you run
28
29 alan
30
31
32 --
33 Optimists say the glass is half full,
34 Pessimists say the glass is half empty,
35 Developers say wtf is the glass twice as big as it needs to be?
36
37 Alan McKinnon
38 alan at linuxholdings dot co dot za
39 +27 82, double three seven, one nine three five
40 --
41 gentoo-user@g.o mailing list

Replies

Subject Author
Re: [gentoo-user] Sync and glsa-check from cron Nick <gentoo-user@××××××.uk>