Read this entire document for the description, usage, features, and installation instructions for use of these programs. The source code is available here, but be warned that development is in progress. The program is freeware, and will probably have to be tweaked for each site. This program is distributed under the GNU General Public License. Please indicate unoffical and official versions (i.e., versions not released by me and versions released by me) by prefixing a `U' or an 'O' before the version number. I'd appreciate it if you could notify me of any modifications you may make so I can incorporate them into the official version. You, the user, are responsible for everything the program does.
The plan program will change your plan file each time someone fingers you and try to catch the person in the act (even though one could say you might have a few problems if you can't tell yourself)! The plan program works with the help of a "named pipe" (a.k.a. FIFO), which is created by issuing a `mknod` command (see instruction 1). This creates a special file such that anything to you write or read from this file has to be read by or written to by something else respectively. What the plan program does is go into an infinite loop writing something to this file. The writing process is blocked normally since nothing is reading from the other end. The moment someone fingers you, the finger daemon attempts to read the .plan file. At this point, the writing process can now pipe its output through the .plan file to the finger daemon, consequently to the user. Then the loop starts again. So each time you go through the loop, i.e., each time someone fingers you, you can change the plan. The moment your writing process can write, you know someone has fingered you and thus you send off the "logfinger" script that fingers back the host from whence the finger request originated.
The planedit program is an option for those systems that do not allow the creation of a named pipe for a plan (including VMS systems).
A more elegant solution than the above two exists for plan changing and finger logging programs, which is the kfingerd program which is available for Linux (port it to your machine). This does all this the proper way. This program (plan and planedit) should be used as the last resort only if you don't have any sort of superuser privilege.
plan [
number-of-quotes]
Begins an infinite loop by writing to the named pipe plan file. If
a finger request is received, prints out the original plan file, a
random quote if number-of-quotes is specified, and logs the finger
request.
replace_plan
planedit plan-file i|o [
number-of-quotes]
There are no bugs. Here is a list of caveats and features you should be aware (beware?) of.
To be able to run the plan program, this is the crucial step. See if you can create a named pipe by typing.
% mknod ~/.plan por
% mkfifo ~/.plan
If this works, edit plan.h, replace_plan, logfinger, and Makefile to make sure all the necessary constants are appropriately defined. Just type in `make plan' and it should work out okay.
If it didn't work, you may as well as forget this whole thing and try to use the planedit file to change your plan each time you login or logout. Edit plan.h, Makefile, and type in `make planedit'. Run planedit as part of your login and logout scripts. For login, you have a line that says "planedit i", and for logout, you have a line that says "planedit o". In the case of Unix, within the cshell, you put these commands in the files .login and .logout. For VMS systems, you use login.com, and the symbol "lo" aliased to "@logout.com".