diff options
author | Narayan Desai <desai@mcs.anl.gov> | 2004-05-27 19:24:45 +0000 |
---|---|---|
committer | Narayan Desai <desai@mcs.anl.gov> | 2004-05-27 19:24:45 +0000 |
commit | 6e95a0e2fbd6bc8c8e57223350a577f7579c1461 (patch) | |
tree | 8be36c256d8363c231e0c63a9008a348c0699584 /generators | |
parent | 08310d29932ee5f960f4b849c4cbd5a9d5dc221e (diff) | |
download | bcfg2-6e95a0e2fbd6bc8c8e57223350a577f7579c1461.tar.gz bcfg2-6e95a0e2fbd6bc8c8e57223350a577f7579c1461.tar.bz2 bcfg2-6e95a0e2fbd6bc8c8e57223350a577f7579c1461.zip |
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
Diffstat (limited to 'generators')
-rw-r--r-- | generators/sshbase.py | 10 |
1 files changed, 5 insertions, 5 deletions
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' |