fixing calendar to work with automounted home directories

Bob Cunningham bob at oahu.hig.hawaii.edu
Wed May 17 08:52:25 AEST 1989


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



More information about the Comp.sys.sun mailing list