mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
bug 7790: do not set default route in some cases
This commit is contained in:
parent
7919c7f938
commit
c9c08a3ff8
@ -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
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user