diff options
author | Joshua Harlow <harlowja@yahoo-inc.com> | 2012-06-19 17:58:41 -0700 |
---|---|---|
committer | Joshua Harlow <harlowja@yahoo-inc.com> | 2012-06-19 17:58:41 -0700 |
commit | 43eb6d5aace53bef2116dde0796807befef1d8ff (patch) | |
tree | 4e19b985cb97fd1293f9617c2b800e5377fc8494 /cloudinit/transforms/set_passwords.py | |
parent | b492cedaa5a4e66f4f4c589fc73f53afade7b904 (diff) | |
download | vyos-cloud-init-43eb6d5aace53bef2116dde0796807befef1d8ff.tar.gz vyos-cloud-init-43eb6d5aace53bef2116dde0796807befef1d8ff.zip |
Make most of all the places use the paths join() function so that testing with non-real read/write paths is easier.
Diffstat (limited to 'cloudinit/transforms/set_passwords.py')
-rw-r--r-- | cloudinit/transforms/set_passwords.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cloudinit/transforms/set_passwords.py b/cloudinit/transforms/set_passwords.py index c0cc4e84..e7049f22 100644 --- a/cloudinit/transforms/set_passwords.py +++ b/cloudinit/transforms/set_passwords.py @@ -130,8 +130,8 @@ def handle(_name, cfg, cloud, log, args): replaced_auth = True new_lines.append(replacement) - new_contents = "\n".join(new_lines) - util.write_file('/etc/ssh/sshd_config', new_contents) + util.write_file(cloud.paths.join(False, '/etc/ssh/sshd_config'), + "\n".join(new_lines)) try: cmd = ['service'] |