public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Nick <gentoo-user@njw.me.uk>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Sync and glsa-check from cron
Date: Wed, 20 Jun 2007 15:04:03 +0100	[thread overview]
Message-ID: <20070620140403.GI5658@cutie1.lan> (raw)
In-Reply-To: <200706200950.04344.alan@linuxholdings.co.za>

[-- Attachment #1: Type: text/plain, Size: 1431 bytes --]

On Wed, Jun 20, 2007 at 09:50:04AM +0200, Alan McKinnon wrote:
> On Wednesday 20 June 2007, Nick wrote:
> >
> > So, I'm planning to run "sudo emerge --sync" and "sudo glsa-check -f
> > new" from a cron job, perhaps once a week.
> >
> > I can set up the sudoers part all fine, but is there anything I
> > should watch out for / consider when running these maintenance tools
> > from a cron job?
> 
> Why bother with sudo and /etc/sudoers? That's just an extra layer of 
> unnecessary complexity. The usual assortment of cron daemons can all 
> run commands as root. Write a script to run the commands you want, copy 
> it to /etc/cron.d/weekly. It will run at 4:22 am every Sunday.

Sounds good, I'll do that. For some reason I was under the
impression that root couldn't have its own crontab. Clearly I was
mistaken (just as well, that wouldn't make much sense...)

> You'll have to be aware of the usuaal limitations of cron jobs - they do 
> not run under bash, and they seldom have the same environment variables 
> set as what a r\egular user gets. So always include full paths to any 
> command you run

I'll probably be back here if I some variable reassignments or
whatever cause things to get confused, but it doesn't sound likely.

Thanks guys,

-Nick

-- 
GPG Key : www.njw.me.uk/nick.gpg.asc     GPG Key ID: 04E4653F
  GPG Fingerprint: 9732 D7C7 A441 D79E FDF0 94F6 1F48 5674 04E4 653F

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

      reply	other threads:[~2007-06-20 14:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-19 22:18 [gentoo-user] Sync and glsa-check from cron Nick
2007-06-19 22:26 ` Joshua Doll
2007-06-19 23:34   ` Boyd Stephen Smith Jr.
2007-06-19 23:20 ` Boyd Stephen Smith Jr.
2007-06-20  7:50 ` Alan McKinnon
2007-06-20 14:04   ` Nick [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070620140403.GI5658@cutie1.lan \
    --to=gentoo-user@njw.me.uk \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox