<div dir="ltr"><div class="gmail_quote"><div dir="ltr">Hi Avi, thanks for the info. I got it working like I pretty much want. For everyone else that might be interested in this here is what I came up with....<div><br></div><div>In: /usr/lib/yum-plugins/mcafee.py<br></div><div><br></div><div>---------------------------------------------- </div><div><br></div><div><div>from yum.plugins import PluginYumExit, TYPE_CORE, TYPE_INTERACTIVE</div><div>import subprocess, os</div><div><br></div><div>requires_api_version = '2.3'</div><div>plugin_type = (TYPE_CORE, TYPE_INTERACTIVE)</div><div><br></div><div>def predownload_hook(conduit):</div><div>        if os.path.isfile("/etc/init.d/nails"):</div><div>                <a href="http://conduit.info" target="_blank">conduit.info</a>(2, '\nStopping McAfee Virus Scanner\n')</div><div>                subprocess.call(["/sbin/service", "nails", "stop"], stdout=open(os.devnull, "w"), stderr=subprocess.STDOUT)</div><div><br></div><div>def posttrans_hook(conduit):</div><div>        if os.path.isfile("/etc/init.d/nails"):</div><div>                <a href="http://conduit.info" target="_blank">conduit.info</a>(2, '\nStarting McAfee Virus Scanner\n')</div><div>                subprocess.call(["/sbin/service", "nails", "start"], stdout=open(os.devnull, "w"), stderr=subprocess.STDOUT)</div></div><div><br></div><div><div>---------------------------------------------- </div></div><div><br></div><div>In: /etc/yum/pluginconf.d/mcafee.conf<br></div><div><br></div><div><div>---------------------------------------------- </div></div><div><br></div><div><div>[main]</div><div>enabled=1</div></div><div><br></div><div><div>---------------------------------------------- </div></div><div><br></div><div>So when I either install or remove a package, the nails process is stopped and restarted.</div><div><br></div><div><div>---------------------------------------------- </div></div><div><br></div><div><div>Downloading Packages:</div><div><br></div><div><font color="#ff0000"><b>Stopping McAfee Virus Scanner</b></font></div><div><br></div><div>Running rpm_check_debug</div><div>Running Transaction Test</div><div>Transaction Test Succeeded</div><div>Running Transaction</div><div>  Erasing    : augeas-1.0.0-7.el6.x86_64                                                                                                          1/2</div><div>  Erasing    : augeas-libs-1.0.0-7.el6.x86_64                                                                                                     2/2</div><div><br></div><div><font color="#ff0000"><b>Starting McAfee Virus Scanner</b></font></div><div><br></div><div>  Verifying  : augeas-libs-1.0.0-7.el6.x86_64                                                                                                     1/2</div><div>  Verifying  : augeas-1.0.0-7.el6.x86_64                                                                                                          2/2</div><div><br></div><div>Removed:</div><div>  augeas.x86_64 0:1.0.0-7.el6                                             augeas-libs.x86_64 0:1.0.0-7.el6</div></div><div><br></div><div><br></div><div>Really wanted the process to restart after the "Removed" is printed, but if I did that, everything done in yum would try and start the nails process. Not good!</div><div><br></div><div>Just thought I'd share with you all!</div><div><br></div><div>Regards,</div><div><br></div><div>Glen Collins</div><div><br></div><div><br></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 17, 2014 at 8:20 PM, Avi Miller <span dir="ltr"><<a href="mailto:avi.miller@oracle.com" target="_blank">avi.miller@oracle.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hey,<br>
<span><br>
> On 18 Nov 2014, at 3:00 pm, Glen Collins <<a href="mailto:glenc2004@comcast.net" target="_blank">glenc2004@comcast.net</a>> wrote:<br>
><br>
> Hello all. I'm wondering what the best approach is to turn off virus scanning during patching of a system. Having it turned on while spacewalk patches a system can take a lot longer to complete if it's turned on. I'm wondering what the best approach to automate this and turn it off and back on again after patching.<br>
<br>
</span>Take a look at the yum-plugin-post-transaction-actions package which enables yum to run specific actions after a transaction that updates packages is completed. You could probably use it as a starting point to creating a plugin to run actions prior to the transaction as well.<br>
<br>
Cheers,<br>
Avi<br>
<br>
--<br>
Oracle <<a href="http://www.oracle.com" target="_blank">http://www.oracle.com</a>><br>
<span><font color="#888888">Avi Miller | Product Management Director | <a href="tel:%2B61%20%283%29%208616%203496" value="+61386163496" target="_blank">+61 (3) 8616 3496</a><br>
Oracle Linux and Virtualization<br>
417 St Kilda Road, Melbourne, Victoria 3004 Australia<br>
<br>
</font></span></blockquote></div><br></div>
</div></div></div><br></div>