summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2005-01-19 03:47:01 +0000
committerNarayan Desai <desai@mcs.anl.gov>2005-01-19 03:47:01 +0000
commitbdde74b47b38bb15c10b7533c212a37d9c928a8a (patch)
tree79a6d8ffcf301e96672be5589bfc2f990bb7e6d0
parentc1e8bf713517fcbd1c62982efbf1a5fae6832ce1 (diff)
downloadbcfg2-bdde74b47b38bb15c10b7533c212a37d9c928a8a.tar.gz
bcfg2-bdde74b47b38bb15c10b7533c212a37d9c928a8a.tar.bz2
bcfg2-bdde74b47b38bb15c10b7533c212a37d9c928a8a.zip
switch to equivalence
(Logical change 1.192) git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@812 ce84e21b-d406-0410-9b95-82705330c041
-rw-r--r--src/lib/Server/Generators/SSHbase.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/Server/Generators/SSHbase.py b/src/lib/Server/Generators/SSHbase.py
index 42eb2438f..7d76aa6d9 100644
--- a/src/lib/Server/Generators/SSHbase.py
+++ b/src/lib/Server/Generators/SSHbase.py
@@ -74,7 +74,7 @@ class SSHbase(Generator):
perms = '0644'
entry.attrib.update({'owner':'root', 'group':'root', 'perms':perms})
entry.text = keydata
- if "ssh_host_key.H_" in filename:
+ if "ssh_host_key.H_" == filename[:15]:
entry.attrib['encoding'] = 'base64'
entry.text = b2a_base64(keydata)
@@ -95,9 +95,9 @@ class SSHbase(Generator):
'''Generate new host keys for client'''
keylist = [keytmpl % client for keytmpl in self.hostkeys]
for hostkey in keylist:
- if 'ssh_host_rsa_key.H_' in hostkey:
+ if 'ssh_host_rsa_key.H_' == hostkey[:19]:
keytype = 'rsa'
- elif 'ssh_host_dsa_key.H_' in hostkey:
+ elif 'ssh_host_dsa_key.H_' == hostkey[:19]:
keytype = 'dsa'
else:
keytype = 'rsa1'