From 1255a15d6c07068f8119e42b9da16f93a627cd2d Mon Sep 17 00:00:00 2001 From: Ossi Salmi Date: Wed, 18 Jan 2012 12:26:23 +0200 Subject: [PATCH] Fixed warning in console_type fact when /etc/boot.conf is missing --- custom/lib/facter/console_type.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom/lib/facter/console_type.rb b/custom/lib/facter/console_type.rb index 52945ec..f17df61 100644 --- a/custom/lib/facter/console_type.rb +++ b/custom/lib/facter/console_type.rb @@ -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]$/