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 1afa8801045..9e104428179 100755 --- a/patches/systemvm/debian/config/etc/init.d/cloud-early-config +++ b/patches/systemvm/debian/config/etc/init.d/cloud-early-config @@ -243,11 +243,14 @@ setup_dhcpsrvr() { setup_dnsmasq setup_apache2 $ETH0_IP - 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 + if [ "$DEFAULTROUTE" == "true" ] + 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 + fi sed -i /gateway/d /etc/hosts echo "$ETH0_IP $NAME" >> /etc/hosts @@ -415,6 +418,9 @@ for i in $CMDLINE type) TYPE=$VALUE ;; + defaultroute) + DEFAULTROUTE=$VALUE + ;; esac done }