]> git.donarmstrong.com Git - dsa-puppet.git/blobdiff - modules/motd/templates/motd.erb
line wrap motd
[dsa-puppet.git] / modules / motd / templates / motd.erb
index 24f810b8ee1a09784af9cc102f44b9ff47823d74..37d9b4fe3d7468de6831702a48735fef0fee9898 100644 (file)
@@ -2,21 +2,16 @@
 This device is for authorized users only.  All traffic on this device
 is monitored and will be used as evidence for prosecutions.
 
-** IMPORTANT WARNING **
-
-Please read:
-
-http://lists.debian.org/debian-devel-announce/2003/debian-devel-announce-200312/msg00001.html
-
-before doing anything on these machines - especially the "What to do
-when you can login" section.
-
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 <%=
+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