summaryrefslogtreecommitdiff
path: root/cloudinit/config/cc_set_passwords.py
diff options
context:
space:
mode:
authorharlowja <harlowja@virtualbox.rhel>2012-06-21 09:12:16 -0700
committerharlowja <harlowja@virtualbox.rhel>2012-06-21 09:12:16 -0700
commit0c83ff5cb81b6de3028cf90e7dd6aba565682dbf (patch)
treea499408fa70a248b32f0e82e36b9ae893dce46e9 /cloudinit/config/cc_set_passwords.py
parent64f1347cb8f2580339d539b7772e7872ed81cae9 (diff)
downloadvyos-cloud-init-0c83ff5cb81b6de3028cf90e7dd6aba565682dbf.tar.gz
vyos-cloud-init-0c83ff5cb81b6de3028cf90e7dd6aba565682dbf.zip
1. Renames for debug message from 'transform' to 'module'
2. Fixing up more cloud.path.joins found to use the right ro/rw filename
Diffstat (limited to 'cloudinit/config/cc_set_passwords.py')
-rw-r--r--cloudinit/config/cc_set_passwords.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/cloudinit/config/cc_set_passwords.py b/cloudinit/config/cc_set_passwords.py
index ce17f357..eb68ddfe 100644
--- a/cloudinit/config/cc_set_passwords.py
+++ b/cloudinit/config/cc_set_passwords.py
@@ -106,7 +106,9 @@ def handle(_name, cfg, cloud, log, args):
replacement = "PasswordAuthentication %s" % (pw_auth)
# See http://linux.die.net/man/5/sshd_config
- old_lines = util.load_file('/etc/ssh/sshd_config').splitlines()
+ conf_fn = cloud.paths.join(True, '/etc/ssh/sshd_config')
+ # Todo: use the common ssh_util function for this parsing...
+ old_lines = util.load_file(conf_fn).splitlines()
for i, line in enumerate(old_lines):
if not line.strip() or line.startswith("#"):
new_lines.append(line)