jms@tymix.tymnet.com (Joe Smith) (06/15/89)
I want to have my .logout script put a rasterfile on the screen when I logout on a workstation. Using "if (`tty` == /dev/console)" I can reject logins from the dialup ports and rlogin sessions, the file server has /dev/ttya as its console. My first misguided attempt to check if /dev/console is the same as /dev/ttya caused the server to panic with a bus error. Any suggestions? -- Joe Smith (408)922-6220 | SMTP: JMS@F74.TYMNET.COM or jms@tymix.tymnet.com McDonnell Douglas FSCO | UUCP: ...!{ames,pyramid}!oliveb!tymix!tardis!jms PO Box 49019, MS-D21 | PDP-10 support: My car's license plate is "POPJ P," San Jose, CA 95161-9019 | narrator.device: "I didn't say that, my Amiga did!"
brent@uunet.uu.net (Brent Chapman) (06/23/89)
# I want to have my .logout script put a rasterfile on the screen when I # logout on a workstation. Using "if (`tty` == /dev/console)" I can reject # logins from the dialup ports and rlogin sessions, the file server has # /dev/ttya as its console. My first misguided attempt to check if # /dev/console is the same as /dev/ttya caused the server to panic with a # bus error. Any suggestions? Assuming that your /etc/ttytype correctly identifies the type of your console terminal as something other than "sun" when the console is to an ASCII terminal through ttya, you can just check the "$TERM" environment variable to see if it's "sun"... For example: if ((`tty` == /dev/console) && ($TERM == sun)) then display_raster endif -Brent -- Brent Chapman Capital Market Technology, Inc. Computer Operations Manager 1995 University Ave., Suite 390 brent@capmkt.com Berkeley, CA 94704 {apple,lll-tis,uunet}!capmkt!brent Phone: 415/540-6400
jms@ames.arc.nasa.gov (Joe Smith) (07/01/89)
Thanks to all who responded. I must have had a mental block because I was already doing something along those lines in my .login file. The relevant lines in my .logout file are now: if ("`tty`" == /dev/console && "$TERM" == sun) then clear screenload ~/.logoutscreen endif As to the other thing I hinted about: cat /dev/console /dev/ttya ^D does not cause a bus-error panic after upgrading to SunOS-4.0.3. -- Joe Smith (408)922-6220 | SMTP: JMS@F74.TYMNET.COM or jms@tymix.tymnet.com McDonnell Douglas FSCO | UUCP: ...!{ames,pyramid}!oliveb!tymix!tardis!jms PO Box 49019, MS-D21 | PDP-10 support: My car's license plate is "POPJ P," San Jose, CA 95161-9019 | narrator.device: "I didn't say that, my Amiga did!"