Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!mit-eddie!uw-beaver!rice!sun-spots-request From: bob@oahu.hig.hawaii.edu (Bob Cunningham) Newsgroups: comp.sys.sun Subject: fixing calendar to work with automounted home directories Keywords: Software Message-ID: <8905091734.AA04753@oahu.hig.hawaii.edu> Date: 16 May 89 22:52:25 GMT Sender: usenet@rice.edu Organization: Sun-Spots Lines: 38 Approved: Sun-Spots@rice.edu Original-Date: Tue, 9 May 89 07:34:59 HST X-Sun-Spots-Digest: Volume 7, Issue 289, message 16 of 18 With a series of machines that use automount to cross-mount directories from different servers, I had some problems with the nightly "calendar -" runs: duplicate calendar mail (from different machines running calendar on the same calendar files) complaints from cron about not finding mount points a lot of network traffic as all the different systems went and mounted all the different partitions with home directories My fix was twofold: 1. Not running calendar nightly on diskless clients (comment out the crontab entry). 2. Install the following diff to /usr/bin/calendar on each server (which selects only those home directories actually on that server...and assumes you follow the /mumble/servername*/* convention for home directories). Only works if your YP passwd map is complete and accurate (i.e., people actually keep their calendar files in their home directores specified in the passwd map), but if that's true for you, you'll find this useful: __________/usr/bin/calendar diff 5a6,10 > if (/usr/etc/rpcinfo -p |grep -s ypbind); then > caldata="/bin/ypcat passwd.byname" > else > caldata="cat /dev/null" > fi 22c27 < ypcat passwd.byname | grep `hostname` | grep -v '^[+-]' |\ --- > $caldata |cat /etc/passwd - | grep -v '^[+-]' |\ __________end of diff