X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=NodeUpdate.py;h=f8634039858b13688aeb53f135a5db4f5d2cadfe;hb=751806192a0e83de04986ca8632a468419ea2e11;hp=41d5880cc529c9b75772e7df600757ec51e532f0;hpb=1063256ed65e62c07e12328d0a75d3b06ba27aac;p=nodeupdate.git diff --git a/NodeUpdate.py b/NodeUpdate.py index 41d5880..f863403 100644 --- a/NodeUpdate.py +++ b/NodeUpdate.py @@ -65,6 +65,8 @@ YUM_PATH = "/usr/bin/yum" RPM_PATH = "/bin/rpm" +RPM_GPG_PATH = "/etc/pki/rpm-gpg" + # location of file containing http/https proxy info, if needed PROXY_FILE = '/etc/planetlab/http_proxy' @@ -154,6 +156,14 @@ class NodeUpdate: return 0 + def InstallKeys( self ): + Message( "\nRemoving any existing GPG signing keys from the RPM database" ) + os.system( "%s --allmatches -e gpg-pubkey" % RPM_PATH ) + + Message( "\nInstalling all GPG signing keys in %s" % RPM_GPG_PATH ) + os.system( "%s --import %s/*" % (RPM_PATH, RPM_GPG_PATH) ) + + def ClearRebootFlag( self ): os.system( "/bin/rm -rf %s" % REBOOT_FLAG ) @@ -278,6 +288,7 @@ if __name__ == "__main__": Error( "Unable to initialize." ) else: nodeupdate.RemoveRPMS() + nodeupdate.InstallKeys() nodeupdate.CheckForUpdates() Message( "\nUpdate complete." )