summaryrefslogtreecommitdiff
path: root/cloudinit/util.py
diff options
context:
space:
mode:
authorMatthew Thode <mthode@mthode.org>2016-08-21 18:15:56 -0500
committerMatthew Thode <mthode@mthode.org>2016-08-22 10:33:44 -0500
commit1f8b37e0d80534d2055ee2e888f5a7e36c4b98b4 (patch)
tree6c8f3e088ca1eb16b459c4494f5128b94b7d06cf /cloudinit/util.py
parent41271bd8609550d02868b7681b49b8791678beaa (diff)
downloadvyos-cloud-init-1f8b37e0d80534d2055ee2e888f5a7e36c4b98b4.tar.gz
vyos-cloud-init-1f8b37e0d80534d2055ee2e888f5a7e36c4b98b4.zip
Fix Gentoo net config generation
This gets Gentoo work on simple configs with static IPs or DHCP on physical interfaces. This gets Gentoo bootable again.
Diffstat (limited to 'cloudinit/util.py')
-rw-r--r--cloudinit/util.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/cloudinit/util.py b/cloudinit/util.py
index db80ca96..9c89de61 100644
--- a/cloudinit/util.py
+++ b/cloudinit/util.py
@@ -1639,6 +1639,11 @@ def get_builtin_cfg():
return obj_copy.deepcopy(CFG_BUILTIN)
+def is_link(path):
+ LOG.debug("Testing if a link exists for %s", path)
+ return os.path.islink(path)
+
+
def sym_link(source, link, force=False):
LOG.debug("Creating symbolic link from %r => %r", link, source)
if force and os.path.exists(link):