From 2c6bf00a35c45cb63a0c8688bbf2504dd8610bb1 Mon Sep 17 00:00:00 2001 From: Vishvananda Ishaya Date: Wed, 28 Jul 2010 02:21:11 -0700 Subject: Fix dnsmasq commands to pass in environment properly --- nova/compute/linux_net.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/nova/compute/linux_net.py b/nova/compute/linux_net.py index 861ce779b..4a4b4c8a8 100644 --- a/nova/compute/linux_net.py +++ b/nova/compute/linux_net.py @@ -94,7 +94,7 @@ def bridge_create(net): execute("sudo ifconfig %s up" % net['bridge_name']) def dnsmasq_cmd(net): - cmd = ['sudo dnsmasq', + cmd = ['sudo -E dnsmasq', ' --strict-order', ' --bind-interfaces', ' --conf-file=', @@ -143,8 +143,9 @@ def start_dnsmasq(network): if os.path.exists(lease_file): os.unlink(lease_file) - # FLAGFILE in env - env = {'FLAGFILE' : FLAGS.dhcpbridge_flagfile} + # FLAGFILE and DNSMASQ_INTERFACE in env + env = {'FLAGFILE': FLAGS.dhcpbridge_flagfile, + 'DNSMASQ_INTERFACE': network['bridge_name']} execute(dnsmasq_cmd(network), addl_env=env) def stop_dnsmasq(network): -- cgit