Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!rice!sun-spots-request From: jms@tardis.tymnet.com (Joe Smith) Newsgroups: comp.sys.sun Subject: Re: Calendar Keywords: Software Message-ID: <9832@brazos.Rice.edu> Date: 11 Jul 90 02:01:40 GMT Sender: root@rice.edu Organization: Sun-Spots Lines: 30 Approved: Sun-Spots@rice.edu X-Refs: Original: v9n249, Replies: v9n249 X-Sun-Spots-Digest: Volume 9, Issue 254, message 16 In article <9574@brazos.Rice.edu> rzh@icf.llnl.gov (R. Hanscom) writes: >about 7 or 8 seconds apart. What determines if a machine sends out >calendar mail (other than the fact that the user has a file called >calendar with an entry for that day's date)?? How does calendar identify >users -- from passwd, or aliases, or what?? Will a user get mail from >every machine on the net that mounts his/her home directory, and runs >calendar?? There are two calendar programs. /usr/bin/calendar is the top level script, you can type it out to see how it works. If given an argument (such as a single hyphen), /usr/bin/calendar does everyone's calendar file. /usr/lib/calendar is an executable binary. If invoked with no arguments, it creates a file for egrep to use to match lines with today's date. If invoked with the name of a file, it returns true of the file is NOT on an NFS mounted system. The idea is so that if the home directories are cross mounted on several file servers, mail to a specific user will only come from the local file server. The version of /usr/bin/calendar for SunOS-4.1 optimizes the search for local home directories by adding a grep command to the ypcat command: caldata="/bin/ypcat passwd.byname | grep /home/`hostname`" That plus the "sort -u -" eliminated duplicate mailing on our system. Joe Smith (408)922-6220 | SMTP: jms@tardis.tymnet.com or jms@gemini.tymnet.com BT Tymnet Tech Services | UUCP: ...!{ames,pyramid}!oliveb!tymix!tardis!jms PO Box 49019, MS-C41 | BIX: smithjoe | 12 PDP-10s still running! "POPJ P," San Jose, CA 95161-9019 | humorous dislaimer: "My Amiga speaks for me."