Skip to content

Commit a6107cb

Browse files
committed
Rename 'smartos-lx' identifier to 'illumos-lx'
1 parent 31ba894 commit a6107cb

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

lib/facter/util/facts/posix/virtual_detector.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ module Posix
77
module VirtualDetector
88
class << self
99
def platform
10-
@@fact_value ||= check_docker_lxc || check_freebsd || check_gce || check_smartos_lx
10+
@@fact_value ||= check_docker_lxc || check_freebsd || check_gce || check_illumos_lx
1111
@@fact_value ||= retrieve_from_virt_what
1212
@@fact_value ||= check_vmware || check_open_vz || check_vserver || check_xen || check_other_facts
1313
@@fact_value ||= check_lspci || 'physical'
@@ -26,8 +26,8 @@ def check_gce
2626
'gce' if bios_vendor&.include?('Google')
2727
end
2828

29-
def check_smartos_lx
30-
'smartos-lx' if Facter::Resolvers::Uname.resolve(:kernelversion) == 'BrandZ virtual linux'
29+
def check_illumos_lx
30+
'illumos-lx' if Facter::Resolvers::Uname.resolve(:kernelversion) == 'BrandZ virtual linux'
3131
end
3232

3333
def check_vmware

spec/facter/util/facts/posix/virtual_detector_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -241,15 +241,15 @@
241241
end
242242
end
243243

244-
context 'when smartos-lx' do
245-
let(:value) { 'smartos-lx' }
244+
context 'when illumos-lx' do
245+
let(:value) { 'illumos-lx' }
246246

247247
before do
248248
allow(Facter::Resolvers::VirtWhat).to receive(:resolve).with(:vm).and_return('lxc')
249249
allow(Facter::Resolvers::Uname).to receive(:resolve).with(:kernelversion).and_return('BrandZ virtual linux')
250250
end
251251

252-
it 'returns smartos-lx' do
252+
it 'returns illumos-lx' do
253253
expect(detector.platform).to eq(value)
254254
end
255255
end

0 commit comments

Comments
 (0)