# -*- mode: ruby -*- # vi: set ft=ruby : VAGRANTFILE_API_VERSION = "2" def get_internet_ifname() inet_if = %x[ route get 8.8.8.8 | grep interface | head -1 | awk -F' ' '{print $2}' ].chomp ifnames = %x[ VBoxManage list bridgedifs | grep ^Name | cut -b 18- ] ifnames.each_line do |l| if (l.start_with?(inet_if)) return l.chomp end end return nil end SETUP_BASE = < /etc/apt/sources.list < /etc/apt/sources.list <