Identify operating systems closely related to CoreOS

If the the value of ID= is not recognised, identify the OS if it is a derivative of CoreOS
https://www.freedesktop.org/software/systemd/man/os-release.html#ID_LIKE=
This commit is contained in:
Kosy Anyanwu 2018-03-20 14:56:22 +01:00
parent 419afb4dcf
commit 52a8b0c65e
1 changed files with 1 additions and 1 deletions

View File

@ -4,7 +4,7 @@ module VagrantPlugins
module GuestCoreOS module GuestCoreOS
class Guest < Vagrant.plugin("2", :guest) class Guest < Vagrant.plugin("2", :guest)
def detect?(machine) def detect?(machine)
machine.communicate.test("cat /etc/os-release | grep ID=coreos") machine.communicate.test("(cat /etc/os-release | grep ID=coreos) || (cat /etc/os-release | grep -E 'ID_LIKE=.*coreos.*')")
end end
end end
end end