git://git.onelab.eu
/
nodeupdate.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1063256
)
- (re)install any GPG signing keys before running yum
author
Mark Huang
<mlhuang@cs.princeton.edu>
Tue, 9 May 2006 16:43:04 +0000
(16:43 +0000)
committer
Mark Huang
<mlhuang@cs.princeton.edu>
Tue, 9 May 2006 16:43:04 +0000
(16:43 +0000)
NodeUpdate.py
patch
|
blob
|
history
diff --git
a/NodeUpdate.py
b/NodeUpdate.py
index
41d5880
..
f863403
100644
(file)
--- a/
NodeUpdate.py
+++ b/
NodeUpdate.py
@@
-65,6
+65,8
@@
YUM_PATH = "/usr/bin/yum"
RPM_PATH = "/bin/rpm"
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'
# location of file containing http/https proxy info, if needed
PROXY_FILE = '/etc/planetlab/http_proxy'
@@
-154,6
+156,14
@@
class NodeUpdate:
return 0
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 )
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()
Error( "Unable to initialize." )
else:
nodeupdate.RemoveRPMS()
+ nodeupdate.InstallKeys()
nodeupdate.CheckForUpdates()
Message( "\nUpdate complete." )
nodeupdate.CheckForUpdates()
Message( "\nUpdate complete." )