LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   question -check if updates were installed (https://www.linuxquestions.org/questions/linux-newbie-8/question-check-if-updates-were-installed-4175471305/)

asafmgn 07-29-2013 04:57 AM

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.

chrism01 07-29-2013 05:18 AM

Have you looked at /var/log/yum.log ?

asafmgn 07-29-2013 05:39 AM

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.


All times are GMT -5. The time now is 08:36 PM.