deployment: set dns + gateway config on DEFAULT_INSTALL_DEV

From: Michael Prokop <mprokop@sipwise.com>
ksolomko/vlan
Michael Prokop 13 years ago
parent a1835243cf
commit 27eed530ee

@ -1199,12 +1199,12 @@ if "$PRO_EDITION" ; then
ngcp-network --host=$ROLE --set-interface=$DEFAULT_INSTALL_DEV --ip=auto --netmask=auto --hwaddr=auto
ngcp-network --host=$ROLE --set-interface=$INTERNAL_DEV --ip=auto --netmask=auto --hwaddr=auto
for nameserver in $(awk '/^nameserver/ {print $2}' /etc/resolv.conf) ; do
ngcp-network --host=$ROLE --set-interface=$INTERNAL_DEV --dns=\$nameserver
ngcp-network --host=$ROLE --set-interface=$DEFAULT_INSTALL_DEV --dns=\$nameserver
done
GW=$(ip route show dev $INTERNAL_DEV | awk '/^default via/ {print $3}')
GW=$(ip route show dev $DEFAULT_INSTALL_DEV | awk '/^default via/ {print $3}')
if [ -n "\$GW" ] ; then
ngcp-network --host=$ROLE --set-interface=$INTERNAL_DEV --gateway="\$GW"
ngcp-network --host=$ROLE --set-interface=$DEFAULT_INSTALL_DEV --gateway="\$GW"
fi
ngcp-network --host=$ROLE --peer=$PEER

Loading…
Cancel
Save