vagrant: Change addition of default route to use "ip route" command
authorMartin Schwenke <martin@meltin.net>
Sat, 21 Sep 2019 01:30:40 +0000 (11:30 +1000)
committerMartin Schwenke <martin@meltin.net>
Sat, 21 Sep 2019 01:30:40 +0000 (11:30 +1000)
Old "route" command is not always installed.

Signed-off-by: Martin Schwenke <martin@meltin.net>
vagrant/Vagrantfile

index 8bf508b696ae7dc26537b89a98015e876a19b693..7ae6a6522b74f1152e32103782c984f729fa3c51 100644 (file)
@@ -65,7 +65,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
         virthost = settings['virthost']
         v.vm.provision "shell",
                        run: "always",
-                       inline: "route add default gw " + virthost + "|| :"
+                       inline: "ip route add default via " + virthost + " || :"
       end
 
       # No shared folders - they might require extra software on the