Skip to content
Snippets Groups Projects
Verified Commit 88055a1e authored by Adam Lewenberg's avatar Adam Lewenberg
Browse files

motd.erb change

parent 6fd31cba
No related branches found
No related tags found
1 merge request!7Puppet5 lonlone
unreleased (207x-xx-xx)
[os] motd.erb needs to handle case when there is no swap.
[several] change 'crit "stuff"' to 'crit("stuff")' to make Puppet 5
happy. [adamhl]
......
......@@ -33,12 +33,17 @@
end
memory = memory.gsub(/\s+/, '')
swap = @swapsize
if swap.match(/\./)
swap = swap.sub(/0+ /, ' ')
swap = swap.sub(/\. /, ' ')
# Not every server has a swap disk
if (@swapsize) then
swap = @swapsize
if swap.match(/\./)
swap = swap.sub(/0+ /, ' ')
swap = swap.sub(/\. /, ' ')
end
swap = swap.gsub(/\s+/, '')
else
swap = 'No'
end
swap = swap.gsub(/\s+/, '')
-%>
<%= host %> - <%= os %>, <%= @architecture %>
<%= @processorcount %>-core <%= processor %> (<%= product %>); <%= memory %> RAM, <%= swap %> swap
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment