Replies: 21 comments 3 replies
|
There are two types of login and logout programs - the "external" ones in CMDNC0, and personal ones in your own UFD. I don't think there's a logout in the personal class, just in the "externals" class. Any of these can be COMI files, CPL scripts, or compiled binaries (.SAVE or .RUN). |
|
Hmm. I'm leaning toward me having a bout a false memory syndrome in that case. The late 80s was a long time ago ... :) Thanks! |
|
After more thought and trawling through "Appendix A External Login and Logout Programs" in the "Sys Admin Guide Rev 20.2 DOC5037-4LA 1986" I'm back to thinking we had 'custom' LOGIN & LOGOUT programs after all. From that appendix ... (excuse any PDF OCR mistakes) _Since Rev. 19, you can write separate external programs to monitor and control logins and logouts. At login time, the PRIMOS operating system looks for a program in These programs cannot be EPFs; they must be static-mode programs Our login procedure would show you a system name banner, display a 'message of the day', list your latest emails, and then hand over to USERXX>LOGIN.CPL as usual I definitely remember now having a LOGOUT.CPL that did such things as saving the ECL command list and flushing a TEMP directory. Also, I remember our VDUs issued a 'clear screen' on logout. This leads me to believe that we must also have had a custom LOGOUT in CMDNC0 (Much of this was above my paygrade at the time. I was a tape and disk-pack monkey, and FSE baby-sitter, for most of my PR1ME admin/ops duties. I only really started fully being involved in customising systems as we moved into the era of the early EXL unix machines and Netware servers.) So - my challenge to myself now is to dust off the Pascal knowledge (or PLP for the hell of it!) and see if I can recreate this functionality on my Rev20 machine. At least I ccan take a snap-shot of the machine on the host Pi4 in case I really bollix it up! ;) |
|
I've got examples of our externals in FTN, and the seg split-load scripts and such, if you want such cheats. We had some captive user accounts for which we'd disable the break key at login, and delete the "online" records for their sessions from the MIDAS files at logout. I'd forgotten the CMDNC0 externals had to be static linked. The personal ones could be nearly anything. (And mine was LOGIN.RUN, and occasionally someone would edit it as a joke, stuff some CP0L in there, and save it. Sigh. OTOH, having Pascal has been a long time, but if you decide on PLP, I've done some of that more recently. |
|
The aforementioned externals are here, in MAGSAV form: https://sysovl.info/pages/blobs/prime/misc/boris_externals.tap |
|
Ta! I'll have a gander throught the BORIS tape tomorrow. |
|
Putting the idea of the user LOGOUT.XXX aside for a second, I just want to check my logic for 'order of operation'. At the very least, is this correct ... (ECL stuff invoked from my LOGIN.CPL _Welcome to the Prime Computer 50-series emulator, running Primos rev 20.2.8 Login please. CHRIS (user 2) logged in Tuesday, 26 Jan 21 00:33:12. ++++ RESULT OF CMDNC0>LOGIN HERE ++++ [EDIT_CMD_LINE Rev. 21.0.4 Copyright (c) 1988, Prime Computer, Inc.] CHRIS> //session CHRIS>logout ++++ RESULT OF CMDNC0>LOGOUT HERE ++++ CHRIS (user 2) logged out Tuesday, 26 Jan 21 00:33:36. That feels right from memory, but best to check. And I guess I'm better off going with Prime's Pascal (Rev. 20.2.B2 in my case) rather than the Sheffield V2.7 I got working from your site? |
|
The general order looks right to me. And a personal LOGIN would run after the CMDNC0 one. Seems like the Sheffield compiler was a bit old, but if you got it running, you've gone farther than I. |
|
At Rev20, a personal LOGOUT.CPL doesn't seem to be invoked. |
|
A pair of very quick & dirty Sheffield Pascal programs that purely read CMDNC0>BANNER_IN and _OUT files shows a slight hiccup in the running order. The logout procedure is PRIMOS Logout -> CMDNC0>LOGOUT CHRIS (user 4) logged in Tuesday, 26 Jan 21 14:31:36. ++++ BANNER_IN TEXT ++++ [EDIT_CMD_LINE Rev. 21.0.4 Copyright (c) 1988, Prime Computer, Inc.] CHRIS>lo CHRIS (user 4) logged out Tuesday, 26 Jan 21 14:31:40. OK, Can't really investigate more today, but sorta fun so far! (btw: Gone with Sheffield as having problems with Prime Pascal. Compiling & seg loading OK, but throws up LINKAGE faults at run time. That can wait for now.) |
|
You need to share the PASCAL library, |
|
Would be nice to have more complete / orthogonal product sets! You wouldn't ordinarily need both the static-mode shares and the EPF library. You would need the compiler and its library to match. |
|
No, sorry, that's not necessarily right. If the compiler is a .save, then you'd need the shares. |
|
Anyway - looks like my next step at the weekend is to troll through the Subroutines Reference Guide to remind myself how CP$ (?? that sounds right??) works to call the CPL. It's probably a good job my printer is out-of-service at the moment as I think I'd be surrounded by a small forest-worth of re-printed manuals by now ... ;) |
|
I suspect there's an (undocumented) way to directly call ECL to save its history, but I haven't worked it out yet. I have a .MAP file for ECL$LIB.RUN, but it's compressed with a custom tool, so I need to find the decompressor. CP$ is the right "invoke a command" subroutine. |
|
Small, silly, victories are the best .. So this is very bare bones with no sanity checking goodbye.cpl is just
And so we get ... Which confirms that calling another program on LOGOUT works. Will have to fettle what actually works within the CPL, but happy the basic theory works. Did throw me for a while where I could get the program to BIND & RUN but not complete a SEG LOAD until I remembered that it had to be program main(input,output); rather than program yadayada(input,output); Fun! |
|
Can your command be "r goodbye.cpl" to make it general for any user,
or has Primos already disassociated your home directory by the time
logout runs?
…On 2/6/21, SirNibble ***@***.***> wrote:
Small, silly, victories are the best ..
So this is very bare bones with no sanity checking
```
program main(input,output);
const
%INCLUDE 'SYSCOM>ERRD.INS.PASCAL';
%INCLUDE 'SYSCOM>KEYS.INS.PASCAL';
%INCLUDE 'SYSCOM>A$KEYS.INS.PASCAL';
var
status, code : integer;
cmd : string;
procedure cp$(var ccmd:string; stat:integer; rc:integer);extern;
begin
writeln('Ready to engage CPL ...');
cmd := 'r <users>sman>goodbye.cpl';
cp$(cmd,status,code);
writeln(status);
writeln(code);
writeln('And done ..');
writeln;
end.
```
goodbye.cpl is just
`type 'Goodbye from CPL'
`
for now
And so we get ...
```
<USERS>SMAN>lo
Saved 139 history commands to `<USERS>SMAN>.CMD_HISTORY'.
SMAN (user 2) logged out Saturday, 06 Feb 21 12:36:16.
Time used: 00h 01m connect, 00m 01s CPU, 00m 00s I/O.
Ready to engage CPL ...
Goodbye from CPL
0
0
And done ..
Prime session disconnected
```
Which confirms that calling another program on LOGOUT works.
Will have to fettle what actually works within the CPL, but happy the basic
theory works.
Did throw me for a while where I could get the program to BIND & RUN but not
complete a SEG LOAD until I remembered that it had to be program
main(input,output); rather than program yadayada(input,output);
Fun!
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
#9 (comment)
|
|
Also, if it hasn't disassociated already, "home" may not currently be "origin", so you might want to call |
|
That was to be my next step, using the suggested at$or(k$seth, code), so it should work for any user. And I suppose I really should do some checking for the file existing. |
|
Good Lord, but my Pascal is rusty. Spent far too long banging my head against a 'bad variable' compile error as I'd got my procedure definitions wrong. But, yep, using the at$or sub gets you home to run the CPL. (Yes ... I must put error checking in!) Gives ... |
|
Excellent! |
Uh oh!
There was an error while loading. Please reload this page.
Wasn't there a compilmentary 'logout.cpl' to the 'login.cpl' ?
I'm sure we had one at work, but going through the revisions of the pre-built systems I'm guessing a) I'm wrong, or b) it must have been something custom we had?
Any ideas?
(Mainly running Rev20 at the moment.)
All reactions