From dd3f184d0e7371a04010429030ad18d8c67c0f7f Mon Sep 17 00:00:00 2001 From: Chiradeep Vittal Date: Thu, 30 Dec 2010 18:27:18 -0800 Subject: [PATCH] bug 7790: do not set default route in some cases --- .../systemvm/debian/config/etc/init.d/cloud-early-config | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/patches/systemvm/debian/config/etc/init.d/cloud-early-config b/patches/systemvm/debian/config/etc/init.d/cloud-early-config index 9e104428179..2cd6aaeb86f 100755 --- a/patches/systemvm/debian/config/etc/init.d/cloud-early-config +++ b/patches/systemvm/debian/config/etc/init.d/cloud-early-config @@ -243,13 +243,17 @@ setup_dhcpsrvr() { setup_dnsmasq setup_apache2 $ETH0_IP - if [ "$DEFAULTROUTE" == "true" ] + if [ "$DEFAULTROUTE" != "false" ] then sed -i -e "/^[#]*dhcp-option=option:router.*$/d" /etc/dnsmasq.conf echo "dhcp-option=option:router,$GW" >> /etc/dnsmasq.conf #for now set up ourself as the dns server as well sed -i -e "/^[#]*dhcp-option=6.*$/d" /etc/dnsmasq.conf echo "dhcp-option=6,$NS1,$NS2" >> /etc/dnsmasq.conf + else + sed -i -e "/^[#]*dhcp-option=option:router.*$/d" /etc/dnsmasq.conf + echo "dhcp-option=option:router" >> /etc/dnsmasq.conf + sed -i -e "/^[#]*dhcp-option=6.*$/d" /etc/dnsmasq.conf fi sed -i /gateway/d /etc/hosts