From 07076b1b9caf7f11c74686d546161994e2e2d691 Mon Sep 17 00:00:00 2001
From: Josh Kearney <josh@jk0.org>
Date: Tue, 29 Mar 2011 15:32:44 -0500
Subject: [PATCH] Make Dnsmasq_interface configurable

---
 bin/nova-dhcpbridge | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/bin/nova-dhcpbridge b/bin/nova-dhcpbridge
index 7ef51feba615..f42dfd6b5b78 100755
--- a/bin/nova-dhcpbridge
+++ b/bin/nova-dhcpbridge
@@ -48,6 +48,7 @@ flags.DECLARE('auth_driver', 'nova.auth.manager')
 flags.DECLARE('network_size', 'nova.network.manager')
 flags.DECLARE('num_networks', 'nova.network.manager')
 flags.DECLARE('update_dhcp_on_disassociate', 'nova.network.manager')
+flags.DEFINE_string('dnsmasq_interface', 'br0', 'Default Dnsmasq interface')
 
 LOG = logging.getLogger('nova.dhcpbridge')
 
@@ -103,7 +104,8 @@ def main():
     utils.default_flagfile(flagfile)
     argv = FLAGS(sys.argv)
     logging.setup()
-    interface = os.environ.get('DNSMASQ_INTERFACE', 'br0')
+    # check ENV first so we don't break any older deploys
+    interface = os.environ.get('DNSMASQ_INTERFACE', FLAGS.dnsmasq_interface)
     if int(os.environ.get('TESTING', '0')):
         from nova.tests import fake_flags
     action = argv[1]