From 6e95a0e2fbd6bc8c8e57223350a577f7579c1461 Mon Sep 17 00:00:00 2001 From: Narayan Desai Date: Thu, 27 May 2004 19:24:45 +0000 Subject: update to new fam based DirectoryBacked 2004/05/24 12:39:08-05:00 anl.gov!desai checkin (Logical change 1.19) git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@78 ce84e21b-d406-0410-9b95-82705330c041 --- generators/sshbase.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'generators') diff --git a/generators/sshbase.py b/generators/sshbase.py index b7d07ac8d..c240d0cb6 100644 --- a/generators/sshbase.py +++ b/generators/sshbase.py @@ -19,7 +19,7 @@ class sshbase(Generator): '/etc/ssh/ssh_host_rsa_key.pub':'build_hk'}} def __setup__(self): - self.repository = DirectoryBacked(self.data) + self.repository = DirectoryBacked(self.data, self.fam) def build_skn(self,name,client): filedata = self.repository.entries['ssh_known_hosts'].data @@ -43,16 +43,16 @@ class sshbase(Generator): output = '' for f in self.repository.entries.keys(): if ".pub.H_" in f: - hostname = f.split('_')[-1] - output += "%s,%s.mcs.anl.gov,%s %s"%(host,host,gethostbyname(host),data) + h = f.split('_')[-1] + output += "%s,%s.mcs.anl.gov,%s %s"%(h, h, gethostbyname(h), self.repository.entries[f].data) self.repository.entries['ssh_known_hosts'].data = output def GenerateHostKeys(self,client): keylist = map(lambda x:x%client, ["ssh_host_dsa_key.H_%s","ssh_host_rsa_key.H_%s","ssh_host_key.H_%s"]) for hostkey in keylist: - if 'ssh_host_rsa_key.H_' in filename: + if 'ssh_host_rsa_key.H_' in hostkey: keytype = 'rsa' - elif 'ssh_host_dsa_key.H_' in filename: + elif 'ssh_host_dsa_key.H_' in hostkey: keytype = 'dsa' else: keytype = 'rsa1' -- cgit v1.2.3-1-g7c22