From 52a8b0c65e81125c7dfb4bda0dca4fb97ce5ce08 Mon Sep 17 00:00:00 2001 From: Kosy Anyanwu Date: Tue, 20 Mar 2018 14:56:22 +0100 Subject: [PATCH] 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= --- plugins/guests/coreos/guest.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/guests/coreos/guest.rb b/plugins/guests/coreos/guest.rb index 2fe718a54..c38ed0478 100644 --- a/plugins/guests/coreos/guest.rb +++ b/plugins/guests/coreos/guest.rb @@ -4,7 +4,7 @@ module VagrantPlugins module GuestCoreOS class Guest < Vagrant.plugin("2", :guest) 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