summaryrefslogtreecommitdiff
path: root/cloudinit/net/dhcp.py
diff options
context:
space:
mode:
Diffstat (limited to 'cloudinit/net/dhcp.py')
-rw-r--r--cloudinit/net/dhcp.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/cloudinit/net/dhcp.py b/cloudinit/net/dhcp.py
index c842c839..05350639 100644
--- a/cloudinit/net/dhcp.py
+++ b/cloudinit/net/dhcp.py
@@ -48,8 +48,9 @@ def maybe_perform_dhcp_discovery(nic=None):
if not dhclient_path:
LOG.debug('Skip dhclient configuration: No dhclient command found.')
return {}
- with temp_utils.tempdir(prefix='cloud-init-dhcp-') as tmpdir:
- return dhcp_discovery(dhclient_path, nic, tmpdir)
+ with temp_utils.tempdir(prefix='cloud-init-dhcp-', needs_exe=True) as tdir:
+ # Use /var/tmp because /run/cloud-init/tmp is mounted noexec
+ return dhcp_discovery(dhclient_path, nic, tdir)
def parse_dhcp_lease_file(lease_file):