LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-29-2013, 04:57 AM   #1
asafmgn
LQ Newbie
 
Registered: Jul 2013
Posts: 5

Rep: Reputation: Disabled
question -check if updates were installed


hi all
im new to Linux scripting and Linux in general.
i have a script that install updates to red hat and sles OS's with the yum update or zypper update command.
before that i check if there is and update available with yum check-update or zypper list-updates commands.

my question is how do i know by script that any updates were installed by my previews command.

i thought to use rpm -qa --last and extract the date from there and do some comparing with my logs but i don't know how.

does any one have any suggestion or other method to know if updated were installed?.

thank you.
 
Old 07-29-2013, 05:18 AM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,356

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Have you looked at /var/log/yum.log ?
 
Old 07-29-2013, 05:39 AM   #3
asafmgn
LQ Newbie
 
Registered: Jul 2013
Posts: 5

Original Poster
Rep: Reputation: Disabled
yes i have cheeked this log and i see the installation description there but how do i decide base on this log that installations took place.
there are old record and new records. i need to check that my commands zypper update or yum update did installed some packages. i dont want to check if there any record in there, only the one that are caused by my script.
that why i thought to extract the date there and compare it to the date my script started to run.

* not sure im approaching this correctly.
* also i need it to be compatible with SUSE.

Last edited by asafmgn; 07-29-2013 at 05:41 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
I installed ubuntu 11.10 and updates then installed Wine rumble Linux - Newbie 3 03-16-2012 03:22 PM
Looking after how to check the boxes to get updates. Kristoffer G Mandriva 1 05-23-2009 05:02 AM
yum check-update says no updates when there are updates? MarkEHansen Linux - General 7 12-29-2006 05:16 PM
Firefox Check for Updates SweetLou Linux - General 2 06-11-2006 02:07 PM
Simple Newb Question: How do I check what version of Redhat is Installed from the CLI praefex Linux - General 1 01-27-2004 07:30 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:44 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration