🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.next.sysadmin
Article #2026

The story with MOTD.

#2026
From: 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
Technical Details
Message-ID: <1hnelfINN7kp@morrow.stanford.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!morrow.stanford.edu!morrow.stanford.edu!usenet

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!morrow.stanford.edu!morrow.stanford.edu!usenet
From: lane@sumex-aim.stanford.edu (Christopher Lane)
Newsgroups: comp.sys.next.sysadmin
Subject: The story with MOTD.
Date: 28 Dec 1992 17:48:31 GMT
Organization: Stanford University
Lines: 27
Message-ID: <1hnelfINN7kp@morrow.stanford.edu>
Reply-To: lane@sumex-aim.stanford.edu (Christopher Lane)
NNTP-Posting-Host: ssrg-next-1.stanford.edu