Merge pull request #4565 from dup2/patch-1
guests/ubuntu: A more reliable way to detect Ubuntu via lsb_release
This commit is contained in:
commit
35c9b59968
|
@ -4,7 +4,7 @@ module VagrantPlugins
|
|||
module GuestUbuntu
|
||||
class Guest < Vagrant.plugin("2", :guest)
|
||||
def detect?(machine)
|
||||
machine.communicate.test("cat /etc/issue | grep 'Ubuntu'")
|
||||
machine.communicate.test("[ -x /usr/bin/lsb_release ] && /usr/bin/lsb_release -i 2>/dev/null | grep Ubuntu")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue