On Mon, 10 Mar 2003 09:31:56 Konstantin Kostadinov wrote:
On 10 Mar 2003 08:13:52 -0600
Ron Johnson <[EMAIL PROTECTED]> wrote:

> On Mon, 2003-03-10 at 07:18, Ron Johnson wrote:

[snip]


> > After you install apt-show-versions:
> > # apt-get update
> > # apt-show-versions |grep upgradeable|sort
>
> After reading Tim's reply, I should note that apt-show-versions + grep
> will only tell you if there are new versions of pkgs you currently have
> installed.

tanx
that's the thing i'm looking for.

You might be interested in this script I came up with upon reading this thread. I called it apt-show-versions and placed it in /etc/cron.daily (and made it executable via chmod +x).

Perhaps someone in the thread who is more adept at shell scripting will
let me know if I'm doing anything wrong with it.  :-)  (Bear in mind that
I haven't actually tested my assumption that any script placed in
/etc/cron.daily is run daily, but based on the name I think it's a safe
bet.)

I'm going to put it on all of my machines, so that they will alert me when
they need upgrading.  Note that the apt-show-versions command supports a
"-u" switch which eliminates the need for any grepping.  I'm also not
doing any sorting, but that would be just one more addition in the
pipeline.

#!/bin/sh
# /etc/cron.daily/apt-show-versions: email alerts when new packages
# are available
#
# 2003-03-10, Shaun Crossley, [EMAIL PROTECTED]

[EMAIL PROTECTED]

/usr/bin/apt-show-versions -u | /usr/bin/mail -e \
     -s "`/bin/hostname`: updated packages available" $ADMINMAIL


--


Shaun Crossley
mailto:[EMAIL PROTECTED]
http://www.whatever.ca


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Reply via email to