From 9b97a18b20791baeb89f208904c46a24369df62e Mon Sep 17 00:00:00 2001 From: Narayan Desai Date: Fri, 16 Sep 2005 15:52:56 +0000 Subject: add a prefix nob to control file locations (Logical change 1.316) git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@1291 ce84e21b-d406-0410-9b95-82705330c041 --- src/lib/Server/Plugins/SSHbase.py | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/lib/Server/Plugins/SSHbase.py b/src/lib/Server/Plugins/SSHbase.py index 32345d5d6..4fc670dea 100644 --- a/src/lib/Server/Plugins/SSHbase.py +++ b/src/lib/Server/Plugins/SSHbase.py @@ -37,14 +37,18 @@ class SSHbase(Plugin): def __init__(self, core, datastore): Plugin.__init__(self, core, datastore) self.repository = DirectoryBacked(self.data, self.core.fam) + try: + prefix = open("%s/%s" % (self.data, prefix)).read().strip() + except IOError: + prefix = '' self.Entries = {'ConfigFile': - {'/etc/ssh/ssh_known_hosts':self.build_skn, - '/etc/ssh/ssh_host_dsa_key':self.build_hk, - '/etc/ssh/ssh_host_rsa_key':self.build_hk, - '/etc/ssh/ssh_host_dsa_key.pub':self.build_hk, - '/etc/ssh/ssh_host_rsa_key.pub':self.build_hk, - '/etc/ssh/ssh_host_key':self.build_hk, - '/etc/ssh/ssh_host_key.pub':self.build_hk}} + {prefix + '/etc/ssh/ssh_known_hosts':self.build_skn, + prefix + '/etc/ssh/ssh_host_dsa_key':self.build_hk, + prefix + '/etc/ssh/ssh_host_rsa_key':self.build_hk, + prefix + '/etc/ssh/ssh_host_dsa_key.pub':self.build_hk, + prefix + '/etc/ssh/ssh_host_rsa_key.pub':self.build_hk, + prefix + '/etc/ssh/ssh_host_key':self.build_hk, + prefix + '/etc/ssh/ssh_host_key.pub':self.build_hk}} self.ipcache = {} self.domains = ['mcs.anl.gov', 'bgl.mcs.anl.gov', 'globus.org', 'uc.teragrid.org'] -- cgit v1.2.3-1-g7c22