diff options
author | Scott Moser <smoser@ubuntu.com> | 2014-02-24 17:20:12 -0500 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2014-02-24 17:20:12 -0500 |
commit | da13f065c9a2be372fea35db62e51086d443f8dc (patch) | |
tree | 6984cf3c222cf2d132498b56271b6c97d4344c5d /cloudinit/util.py | |
parent | 2781fc8289e4aab130125b1a3e69b45a9318f805 (diff) | |
download | vyos-cloud-init-da13f065c9a2be372fea35db62e51086d443f8dc.tar.gz vyos-cloud-init-da13f065c9a2be372fea35db62e51086d443f8dc.zip |
fixes from testing, force symlink
Diffstat (limited to 'cloudinit/util.py')
-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) |