Changed 'plugins' directory name to 'lib' to reflect changes in 0.25+ puppet server.

This commit is contained in:
Timo Mkinen 2010-04-17 18:26:02 +03:00
parent 05b0b8ab70
commit 24000d595c
6 changed files with 0 additions and 0 deletions

View file

@ -0,0 +1,30 @@
Facter.add('console_type') do
setcode do
begin
Facter.kernel
rescue
Facter.loadfacts()
end
console = 'vga'
kernel = Facter.value('kernel')
if kernel == 'Linux'
File.open('/proc/cmdline', 'r') do |f|
while line = f.gets
if line =~ /console=ttyS[0-9]/
console = 'serial'
end
end
end
elsif kernel == 'OpenBSD'
File.open('/etc/boot.conf', 'r') do |f|
while line = f.gets
if line =~ /^set tty com[0-9]$/
console = 'serial'
end
end
end
end
console
end
end

View file

@ -0,0 +1,8 @@
require 'puppet'
Facter.add('puppet_ssldir') do
setcode do
Puppet.parse_config
Puppet.settings.value('ssldir')
end
end