[H-GEN] printing motd a page at a time

James Mcpherson j.mcpherson at mailbox.uq.edu.au
Mon Aug 24 18:08:09 EDT 1998


On Mon, 24 Aug 1998, Laurence J. Rietberg wrote:
> I use RH Linux, release 5.1; kernel v.2.1.117 on a dual-Pentium PC.
> Printing the motd a page at a time sounds straightforward enough, but 
> /etc/motd is supposed to be the message to be printed as used by login(1)
> if .hushlogin is not present, so it is not a simple case of creating a small
> shell script with cat /etc/motd | more -d or something like that.  Hence,
> if the file /etc/motd is greater than a screenfull--too bad, you miss the
> all but the end of it.
> Anyone have some ideas?  I'm beat with this one.  Recompile login?  (It
> would be nice to customize motd to print a page at a time the way it's done
> on student.uq.edu.au, for example.)  Thanks.

if you use a text editor to write /etc/motd, you can put in ^L characters 
to break the page. I think that as long as the terminal the user is logging
in on has a defined response for that character in /etc/termcap and their
PAGER environment variable is set then that should do what you need.

cheers,
jcm

-- 
 I do not speak for the University of Queensland or the University Library
J.McPherson at mailbox.uq.edu..au   | this space _not_ for rent. 
j.mcpherson at library.uq.edu..au   | remove erroneous char to reply properly





More information about the General mailing list