Fixed warning in console_type fact when /etc/boot.conf is missing

This commit is contained in:
Ossi Salmi 2012-01-18 12:26:23 +02:00
parent 92f1617327
commit 1255a15d6c

View file

@ -16,7 +16,7 @@ Facter.add('console_type') do
end
end
end
elsif kernel == 'OpenBSD'
elsif kernel == 'OpenBSD' and File.exists?('/etc/boot.conf')
File.open('/etc/boot.conf', 'r') do |f|
while line = f.gets
if line =~ /^set tty com[0-9]$/