Commit 3cfb6cc9 authored by Bill MacAllister's avatar Bill MacAllister
Browse files

Correct references in motd template

parent 8cc5402b
<% os = lsbdistdescription.gsub(/Debian GNU\/Linux/, "Debian")
<% os = @lsbdistdescription.gsub(/Debian GNU\/Linux/, "Debian")
os.gsub!(/Red Hat Enterprise Linux/i, 'RHEL')
os.gsub!(/RHEL (\w+) release (\d+) \(.* (\d+)\)/i, 'RHEL \1 \2u\3')
os.gsub!(/RHEL (\w+) release ([\d\.]+) \(.*\)/i, 'RHEL \1 \2')
processor = processor0.strip.gsub(/\s+/, " ")
processor = @processor0.strip.gsub(/\s+/, " ")
processor = processor.strip.gsub(/\(R\)|\(TM\)/i, '')
processor = processor.strip.gsub(/(\w+-Core|Processor|CPU) /i, '')
processor = processor.strip.gsub(/(Intel|AMD) /i, '')
host = fqdn.downcase
host = @fqdn.downcase
product = productname rescue nil
if product.nil?
......@@ -26,21 +26,21 @@
product += ", " + serialnumber
end
memory = memorysize
memory = @memorysize
if memory.match(/\./)
memory.sub!(/0+ /, ' ')
memory.sub!(/\. /, ' ')
end
memory.gsub!(/\s+/, '')
swap = swapsize
swap = @swapsize
if swap.match(/\./)
swap.sub!(/0+ /, ' ')
swap.sub!(/\. /, ' ')
end
swap.gsub!(/\s+/, '')
-%>
<%= @host %> - <%= @os %>, <%= @architecture %>
<%= @processorcount %>-core <%= @processor %> (<%= @product %>); <%= @memory %> RAM, <%= @swap %> swap
<%= host %> - <%= os %>, <%= @architecture %>
<%= processorcount %>-core <%= processor %> (<%= product %>); <%= memory %> RAM, <%= swap %> swap
Puppet environment: <%= @environment %>; kernel <%= @kernelrelease %> (<%= @hardwaremodel %>)
<%= @text -%>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment