FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 06-02-2008, 06:14 PM
Nigel Henry
 
Default Script for when system was last updated

Not long ago I booted Lenny, and discovered there were more than 800MB of
updates waiting to be installed, and not a bunch of fun on dialup. Looking at
my saved history files, I hadn't updated for nearly 2 months.

I save the history from the updates in /home/user_name/history-files, and
label these according to the date when I updated. For example 20080528.

Could someone suggest a script I could put in ~/.kde/autostart that would put
up an xmessage saying when the system was last updated, when I boot up Lenny?

Much appreciation to all you scripting gurus out there.

Nigel.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 06-02-2008, 08:57 PM
"Mumia W.."
 
Default Script for when system was last updated

On 06/02/2008 01:14 PM, Nigel Henry wrote:

[...]
Could someone suggest a script I could put in ~/.kde/autostart that would put
up an xmessage saying when the system was last updated, when I boot up Lenny?


Much appreciation to all you scripting gurus out there.

Nigel.




I'm hardly a scripting guru, but this may help you a bit:

#!/bin/bash
hist_files="$HOME/tmp/tmp/history-files"
lastupd=`ls $hist_files | sort -n | tail -1`
xmessage "The system was last updated on $lastupd"




--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 06-02-2008, 09:42 PM
"Douglas A. Tutty"
 
Default Script for when system was last updated

On Mon, Jun 02, 2008 at 08:14:24PM +0200, Nigel Henry wrote:
> Not long ago I booted Lenny, and discovered there were more than 800MB of
> updates waiting to be installed, and not a bunch of fun on dialup. Looking at
> my saved history files, I hadn't updated for nearly 2 months.
>
> I save the history from the updates in /home/user_name/history-files, and
> label these according to the date when I updated. For example 20080528.
>
> Could someone suggest a script I could put in ~/.kde/autostart that would put
> up an xmessage saying when the system was last updated, when I boot up Lenny?
>
> Much appreciation to all you scripting gurus out there.

No idea since I don't run kde.

Why not decide how often you want to update/upgrade and write a
one-liner script to put in crontab to email root "Its time to update the
system".

Doug.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 06-03-2008, 12:12 PM
Nigel Henry
 
Default Script for when system was last updated

On Monday 02 June 2008 22:57, Mumia W.. wrote:
> On 06/02/2008 01:14 PM, Nigel Henry wrote:
> > [...]
> > Could someone suggest a script I could put in ~/.kde/autostart that would
> > put up an xmessage saying when the system was last updated, when I boot
> > up Lenny?
> >
> > Much appreciation to all you scripting gurus out there.
> >
> > Nigel.
>
> I'm hardly a scripting guru, but this may help you a bit:
>
> #!/bin/bash
> hist_files="$HOME/tmp/tmp/history-files"
> lastupd=`ls $hist_files | sort -n | tail -1`
> xmessage "The system was last updated on $lastupd"

Hi. Thanks for the little script. I have a problem understanding the
hist_files= line. The xmessage just says "The system was last updated on",
and no date of the lastupdate is mentioned.

I ran ls /home/djmons/History-files | sort -n | tail -1, and the date of the
latest file is printed out in the shell, so that bit is working ok.

I did change history-files to History-files on the hist_files= line, to
reflect the correct name for the directory where the history files are kept,
but no change. What does the /tmp/tmp signify on that line. It seems as if
the path to where the history files are is not correct.

Nigel.



--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 06-03-2008, 08:24 PM
Nigel Henry
 
Default Script for when system was last updated

On Monday 02 June 2008 23:42, Douglas A. Tutty wrote:
> On Mon, Jun 02, 2008 at 08:14:24PM +0200, Nigel Henry wrote:
> > Not long ago I booted Lenny, and discovered there were more than 800MB of
> > updates waiting to be installed, and not a bunch of fun on dialup.
> > Looking at my saved history files, I hadn't updated for nearly 2 months.
> >
> > I save the history from the updates in /home/user_name/history-files, and
> > label these according to the date when I updated. For example 20080528.
> >
> > Could someone suggest a script I could put in ~/.kde/autostart that would
> > put up an xmessage saying when the system was last updated, when I boot
> > up Lenny?
> >
> > Much appreciation to all you scripting gurus out there.
>
> No idea since I don't run kde.
>
> Why not decide how often you want to update/upgrade and write a
> one-liner script to put in crontab to email root "Its time to update the
> system".
>
> Doug.

Hi Doug. Thanks for the suggestion. I have a whole bunch of distros that I use
on this machine, which is why I often lose track of when I last updated them.
I don't retrieve e-mail on any of them, and collect my mail on the other
machine which is running the really ancient FC2.

Mumia's suggestion put me on the right path, and as you may have seen, I've
now resolved the problem.

Thanks a bunch though for your reply.

Nigel.



--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 06-04-2008, 07:28 AM
Johannes Wiedersich
 
Default Script for when system was last updated

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 2008-06-03 22:24, Nigel Henry wrote:
> On Monday 02 June 2008 23:42, Douglas A. Tutty wrote:
>> On Mon, Jun 02, 2008 at 08:14:24PM +0200, Nigel Henry wrote:
>>> Not long ago I booted Lenny, and discovered there were more than 800MB of
>>> updates waiting to be installed, and not a bunch of fun on dialup.
>>> Looking at my saved history files, I hadn't updated for nearly 2 months.

> Hi Doug. Thanks for the suggestion. I have a whole bunch of distros that I use
> on this machine, which is why I often lose track of when I last updated them.
> I don't retrieve e-mail on any of them, and collect my mail on the other
> machine which is running the really ancient FC2.
>
> Mumia's suggestion put me on the right path, and as you may have seen, I've
> now resolved the problem.

Another approach might be to use update-manager or update-notifier, once
they return to testing [1].

Johannes

[1] http://packages.qa.debian.org/u/update-manager.html

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFIRkQbC1NzPRl9qEURAhrzAJ43TP++jBnksSGJs4Dwkk 0O4ZwxVwCeN7XT
rWntqytCraWDejHK9tGj8qw=
=iIoJ
-----END PGP SIGNATURE-----


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 

Thread Tools




All times are GMT. The time now is 05:08 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org