mirror of
https://github.com/hashicorp/vagrant.git
synced 2026-05-28 04:36:05 -04:00
A more reliable way to detect Ubuntu
The default /etc/issue might have been changed by the administrator and not contain the string 'Ubuntu' anymore.
This commit is contained in:
parent
09738e082a
commit
779e54eef5
1 changed files with 1 additions and 1 deletions
|
|
@ -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 a new issue