diff options
author | Scott Moser <smoser@ubuntu.com> | 2014-03-03 16:53:39 -0500 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2014-03-03 16:53:39 -0500 |
commit | 3fa4022be5a88c93ad7f8c864b4f0962e22c1ecd (patch) | |
tree | 44a566e543343a6fe4f3a1f7c513bc2011effa82 /cloudinit | |
parent | 2b35f6b814b7f30ceea1e8a58c928f2818bb2729 (diff) | |
parent | f33583bae55dbf071cce88c4e85b289c93e970c8 (diff) | |
download | vyos-cloud-init-3fa4022be5a88c93ad7f8c864b4f0962e22c1ecd.tar.gz vyos-cloud-init-3fa4022be5a88c93ad7f8c864b4f0962e22c1ecd.zip |
write status to /run/cloud-init/ for external consumption
This populates and maintains status.json and result.json with
json formated data about cloud-init's errors and datasource.
It is intended to be consumed by other programs that want to
wait until cloud-init is done, or know its success.
LP: #1284439
Diffstat (limited to 'cloudinit')
-rw-r--r-- | cloudinit/util.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cloudinit/util.py b/cloudinit/util.py index 87b0c853..06039ee2 100644 --- a/cloudinit/util.py +++ b/cloudinit/util.py @@ -1395,8 +1395,10 @@ def get_builtin_cfg(): return obj_copy.deepcopy(CFG_BUILTIN) -def sym_link(source, link): +def sym_link(source, link, force=False): LOG.debug("Creating symbolic link from %r => %r", link, source) + if force and os.path.exists(link): + del_file(link) os.symlink(source, link) |