That does the trick. Thanks Alvaro. I have seen you in this group answering 
other's questions patiently too. You have been a great help. Good to have 
you in the group.

Here's what I ended up doing to my Vagrantfile. The route setting starts to 
work after the second boot after provisioning.

VAGRANTFILE_API_VERSION = "2"

$update_rc_local = <<UPDATERCLOCAL
cat << EOFRCLOCAL > /etc/rc.local
#!/bin/sh -e
#
# rc.local
#
# By default this script does nothing.
echo "in rc.local"
ping -c4 10.1.10.1
if [ $? -eq 0 ]; then
  route add default gw 10.1.10.1
  route del default gw 10.0.2.2
else
  echo "Couldn't ping gateway 10.1.10.1... skipping"
fi

exit 0
EOFRCLOCAL

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  config.vm.box = "ubuntu/trusty64"
  config.vm.network "public_network", ip: "10.1.10.36", bridge: 'en1: 
Ethernet Adaptor (en1)'
  config.vm.provision "shell", inline: $update_rc_local

~S

-- 
You received this message because you are subscribed to the Google Groups 
"Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to