[alt.sources.d] `plan' posted alt.sources

cgw@vaxb.acs.unt.edu (06/28/91)

here's a little blurb about `plan', which i posted this afternoon to
alt.sources. please reply via email, if any replies are necessary.

in case you're wondering exactly what plan does, well, here goes: plan creates
a special file - a FIFO queue - called `.plan', and  watches for any access of
that file. because fingerd opens .plan to print any text there, the program
gets activated. the only  parameter to plan is a program to run when this
happens. so, if you needed to get some information to a large group of unknown
users, you could use plan to do it. you'd just create a program or script that
gave the necessary information, and then whenever that account was fingered, it
would run the program (or script). anyway, i've  written a little program
called `fingerer' that i like to run  along with plan. when plan runs fingerer,
fingerer first increases the # of times i've been fingered and then does  a ps
and greps for the string "finger" to see if it can find someone locally running
finger on you. this has some drawbacks, however: if more than one person is
running finger, it might not get the right one... this is increasingly likely
on high-load systems. anyway, fingerer then picks off the userid of the person
running finger, and logs that information to a file, along with the date
& time. if it can't find someone running finger locally, it does a "netstat -n"
to look for connections on port 79. it then snips out the IP address of 
that connection and logs it to a file. then, fingerer cats a file called
`..plan' (since `.plan' is the FIFO). that way, you can still have a .plan
file (of sorts). that's basically it. i've done some special-casing in
the local-user part that checks for specific userids and does output
specifically for that user. i'll be posting a simplified version of fingerer
to alt.sources in a few days (once i get it ported from a brain-dead
sequent/DYNIX to a sun..). 

plan, along with fingerer has MANY MANY possibilities... one that i've 
thought of, but haven't implemented yet, is to give fingerer a list of
people to watch for, and specific information to send them. for instance,
say you wanted everyone else in your office to know that you'd gone out
for a 2 hour lunch, but wanted your boss to know that you were out 
going to the doctor (:-))... just tell fingerer that your boss should
get THIS information, but everyone else get this OTHER information...

anyway... that's it. until i post source for my fingerer, you can
just have plan execute a finger or a who, or something, just for playing..

(this was also mailed to all the respondents)

-cgw-

-------------------------------------------------------------------------------
christopher williams, `gilligan', `dude', cgw@vaxb.acs.unt.edu, +1 817 565 4161
lead programmer/operator, the university of north texas, home of the _VaxCave_!
`help stamp out and abolish redundancy!'           my other .sig is boring too.