🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.sys.next.sysadmin
1 messages
1 total messages Started by Christopher Lane Mon, 28 Dec 1992 17:48
The story with MOTD.
#2026
Author: Christopher Lane
Date: Mon, 28 Dec 1992 17:48
27 lines
2053 bytes
As a couple of earlier threads discussed, MOTD for 2.X doesn't work under 3.0.

Under 3.0, the 'loginwindow' application takes care of updating the 'wtmp' and  
'lastlog' files so this feature of MOTD became redundant.  However, the bug  
that kept it from working is that the 'loginwindow' application updates the  
'wtmp' file BEFORE running the LoginHook, which makes it that much harder for  
MOTD to figure out if you've seen the current motd file since your last login.

(I'm not sure if the 'loginwindow' should update the wtmp before or after the  
LoginHook since the LoginHook does have the option of rejecting the user.)

I've patched MOTD so that it ignores the first 'wtmp' record that matches what  
it's looking for and goes on.  This seems to work and I've had a number of  
people try it out who also feel it's working now.  I've also removed the code  
that is now redundant with 'loginwindow', including the entire LogoutHook.

As before, if you want MOTD to show the motd file, regardless of whether it  
believes the user has seen it, you can set the boolean default OnlyOnce to 'No'  
to get that behavior -- the code patch that's been going around isn't needed.

I've ftp'd the patched MOTD to the submissions directories of the CS.ORST.EDU  
and SONATA.CC.PURDUE.EDU NeXT archives -- though you might want to wait until  
it migrates to the real directories.  There is already a non-patched 3.0 copy  
of MOTD on at least one of archives.  To check if you have what is supposed to  
be a working version, 'grep Kludge MOTD_main.m' should return a match..

- Christopher
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads