[OpenAFS-port-darwin] Patches to make OpenAFS on Mac OS X more user-friendly
Wed, 15 Jan 2003 13:16:13 -0500
On Monday, Jan 13, 2003, at 13:42 US/Eastern, Alexei Kosut wrote:
> I finally got a chance to clean up a few patches to OpenAFS that we've
> been using here at Stanford to make AFS on Mac OS X more user-friendly
> and similar to our (AppleShare-based) Mac OS 9 and Windows clients.
> Hopefully others will find them useful as well:
With patience from Alexei, I have all the patches described below
installed. He even described how to create a new openAFS.pkg for a
double-click install. Many thanks.
> The patches are against OpenAFS 1.2.7 and are available from
> <http://rescomp.stanford.edu/~akosut/macosx/openafs/>. I haven't
> tested with 1.2.8, but they should apply cleanly and work with a minor
> change to afsd.patch (s/28/29).
> - permission.patch
> Conservatively fakes the mode bits on files and directories, so
> that the Finder and other apps using the Carbon and Cocoa
> libraries don't try to restrict access based on them. This means
> that all AFS files can be easily accessed from the Finder without
> needing to change uids or taking any other extraordinary measures.
> - mount.patch
> Allows AFS to be mounted multiple times, each mountpoint with its
> own root volume. This allows usage similar to the Windows client,
> e.g., mounting a drive that contains only the user's home
> directory. Our users find this much easier to work with than
> having to navigate the entire AFS tree in the Finder or open/save
> I have also included mount_afs.tar.gz, which provides a
> "mount_afs" command that can be used to mount a volume and
> register it with the DiskArbitration system so that it shows up in
> the Finder immediately and can be ejected correctly by the user.
When I, as a tokenized AFS user, try to eject my home directroy mounted
via mount-afs, all I get is a Finder beach ball. It doesn't show up in
a df output, but the icon remains on the desktop.
> Note that this patch also makes it so that /afs (mounted by afsd)
> will not unmount unless MNT_FORCE is given. This prevents the
> user from accidentally ejecting /afs in the Finder, and also works
> around a DiskArb bug in Mac OS X (maybe fixed in 10.2?) where
> autodiskmount would sometimes unmount /afs when logging out, even
> though it's marked as non-ejectable.
Trying to eject /afs => beach ball ...
> - afsd.patch
> This patch has afsd register /afs with the DiskArbitration system
> when mounting it. This means that the root afs volume shows up in
> the Finder immediately, and prevents the Finder from getting
> confused by additional AFS volumes later on (i.e., if you use
> mount.patch, you need this one too).
> Also adds a "-nomount" option to afsd, which prevents afsd from
> mounting /afs. We use this by default on our Mac OS X client, so
> that AFS doesn't show up in the interface at all unless the user
> explicitly asks for an AFS volume to be mounted. This is
I've tried editing
/Library/OpenAFS/Tool/root.client/usr/vice/etc/afs.rc, but that must
not be the proper file (; So far /afs continues to be mounted.. hmm.
--- afs.rc.orig Wed Jan 15 12:43:24 2003
+++ afs.rc Wed Jan 15 13:09:01 2003
@@ -14,7 +14,7 @@
if [ -r /var/db/openafs ]; then
+ AFSD="/usr/sbin/afsd -nomount"
@@ -102,7 +102,7 @@
echo "Starting afsd"
+$AFSD -nomount $OPTIONS
# Run package to update the disk
A find didn't turn up any other afs.rc files.
> especially handy for portable or remote users who don't always
> have a network connection, since there isn't an AFS filesystem
> around to hang the Finder if the AFS servers can't be contacted
> (the cache manager may still hang, but since there are no AFS
> volumes mounted, the rest of the OS doesn't notice).
> - rc.patch
> The standard OpenAFS SystemStarter (rc) script uses grep, which
> isn't part of the base Mac OS X install (it's in the BSD package).
> This patch replaces the use of grep with perl, which is always