Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   CentOS (http://www.linux-archive.org/centos/)
-   -   Trigger after yum update (http://www.linux-archive.org/centos/402168-trigger-after-yum-update.html)

07-21-2010 01:50 PM

Trigger after yum update
 
Hello,

we have installed non-repository based software on our centos servers (e.g. vmware tools).
Each time we do 'yum update' we have to run several scripts to check if these software
works after update.
Sometimes we forget ...
It it possible to configure any sort of triggers which will
run automatically after 'yum update' ?
I'd like to avoid writing shell wrappers for yum and looking for yum-way solution ;-)

Regards
Przemyslaw Bak (przemol)





























----------------------------------------------------------------------
Wyprzedaz do -70%!!! Wejdz na Endo.pl
http://linkint.pl/f2791

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos

Ned Slider 07-21-2010 04:34 PM

Trigger after yum update
 
On 21/07/10 14:50, przemolicc@poczta.fm wrote:
> Hello,
>
> we have installed non-repository based software on our centos servers (e.g. vmware tools).
> Each time we do 'yum update' we have to run several scripts to check if these software
> works after update.
> Sometimes we forget ...
> It it possible to configure any sort of triggers which will
> run automatically after 'yum update' ?
> I'd like to avoid writing shell wrappers for yum and looking for yum-way solution ;-)
>
> Regards
> Przemyslaw Bak (przemol)
>

How about using RPM's %triggerin scriptlet?

http://www.rpm.org/api/4.4.2.2/triggers.html
http://www.ibm.com/developerworks/linux/library/l-rpm2/

For example, you could create a dummy rpm package containing a
%triggerin scriptlet to run your scripts in the event that package foo
gets installed/updated.

Lets take vmware as an example (although it's probably not a very good
example). I assume you need to run vmware-config.pl after each kernel
update and you sometime forget to do that. You could build and install a
dummy package that contains a %triggerin scriptlet that triggers on
installation of the package kernel. In an ideal world the %triggerin
scriptlet would simply run /usr/bin/vmware-config.pl, but as that script
requires user interaction, you'd probably have to call it with the
--default flag to provide the default answers to all questions.
Alternatively, you might decide not to run the vmware-config.pl script
automatically but rather send an email to root or something else to
remind you to run it.

Is that the type of solution you're looking for?

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


All times are GMT. The time now is 09:22 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.