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/mounts.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/mounts.py')
| -rw-r--r-- | cloudinit/transforms/mounts.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cloudinit/transforms/mounts.py b/cloudinit/transforms/mounts.py index 44182b87..700fbc44 100644 --- a/cloudinit/transforms/mounts.py +++ b/cloudinit/transforms/mounts.py @@ -168,7 +168,7 @@ def handle(_name, cfg, cloud, log, _args): cc_lines.append('\t'.join(line)) fstab_lines = [] - fstab = util.load_file("/etc/fstab") + fstab = util.load_file(cloud.paths.join(True, "/etc/fstab")) for line in fstab.splitlines(): try: toks = ws.split(line) @@ -180,7 +180,7 @@ def handle(_name, cfg, cloud, log, _args): fstab_lines.extend(cc_lines) contents = "%s\n" % ('\n'.join(fstab_lines)) - util.write_file("/etc/fstab", contents) + util.write_file(cloud.paths.join(False, "/etc/fstab"), contents) if needswap: try: @@ -190,7 +190,7 @@ def handle(_name, cfg, cloud, log, _args): for d in dirs: try: - util.ensure_dir(d) + util.ensure_dir(cloud.paths.join(False, d)) except: util.logexc(log, "Failed to make '%s' config-mount", d) |
