More reliable Ubuntu and Debian guest detection
When dealing with lxc containers, '/proc/version' will have information about the host machine kernel that can possibly have information about an Ubuntu / Debian host, messing up with guest container detection.
This commit is contained in:
parent
617bf08f9e
commit
4625d77072
|
@ -2,7 +2,7 @@ module VagrantPlugins
|
|||
module GuestDebian
|
||||
class Guest < Vagrant.plugin("2", :guest)
|
||||
def detect?(machine)
|
||||
machine.communicate.test("cat /proc/version | grep 'Debian'")
|
||||
machine.communicate.test("cat /etc/issue | grep 'Debian'")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -6,7 +6,7 @@ module VagrantPlugins
|
|||
module GuestUbuntu
|
||||
class Guest < VagrantPlugins::GuestDebian::Guest
|
||||
def detect?(machine)
|
||||
machine.communicate.test("cat /proc/version | grep 'Ubuntu'")
|
||||
machine.communicate.test("cat /etc/issue | grep 'Ubuntu'")
|
||||
end
|
||||
|
||||
def mount_shared_folder(name, guestpath, options)
|
||||
|
|
Loading…
Reference in New Issue