projects
/
mirror
/
dsa-puppet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fe3c811
)
line wrap motd
author
Stephen Gran
<steve@lobefin.net>
Wed, 24 Feb 2010 22:10:04 +0000
(22:10 +0000)
committer
Stephen Gran
<steve@lobefin.net>
Wed, 24 Feb 2010 22:10:04 +0000
(22:10 +0000)
Signed-off-by: Stephen Gran <steve@lobefin.net>
modules/motd/templates/motd.erb
patch
|
blob
|
history
diff --git
a/modules/motd/templates/motd.erb
b/modules/motd/templates/motd.erb
index
6ac169c
..
37d9b4f
100644
(file)
--- a/
modules/motd/templates/motd.erb
+++ b/
modules/motd/templates/motd.erb
@@
-5,9
+5,13
@@
is monitored and will be used as evidence for prosecutions.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
<%=
+def wrap(s, width=78)
+ s.gsub(/(.{1,#{width}})(\s+|\Z)/, "\\1\n")
+end
+
purp = ''
if nodeinfo.has_key?('nameinfo')
- purp +=
nodeinfo['nameinfo']
+ "\n\n"
+ purp +=
wrap(nodeinfo['nameinfo'])
+ "\n\n"
end
purp += 'Welcome to ' + fqdn