Merge "First pass at getting Ubuntu working in CI infra"
authorAndrew Grimberg <agrimberg@linuxfoundation.org>
Tue, 1 Sep 2015 20:59:28 +0000 (20:59 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Tue, 1 Sep 2015 20:59:28 +0000 (20:59 +0000)
vagrant/lf-networking/confignetwork.pp

index 8bf70cab5a41f9bb5f9cc920c964e7812de04f75..a34975895f1a561f46e4e5da33a1535dda2a933f 100644 (file)
@@ -62,6 +62,16 @@ options timeout:2
 }
 
 # set routing
-file { '/etc/sysconfig/network-scripts/route-eth0':
-  content => "default via ${router} dev eth0"
+case $::operatingsystem {
+  'CentOS', 'Fedora', 'RedHat': {
+    file { '/etc/sysconfig/network-scripts/route-eth0':
+      content => "default via ${router} dev eth0"
+    }
+  }
+  'Ubuntu': {
+    file { '/etc/network/if-up.d/0000routing':
+      content => "#!/bin/sh\nip route add default via ${router} dev eth0"
+      mode => '0755'
+    }
+  }
 }