OpenAFS Master Repository branch, openafs-stable-1_8_x, updated. openafs-stable-1_8_13_2-72-g3c93a59
Gerrit Code Review
gerrit@openafs.org
Thu, 3 Jul 2025 14:31:05 -0400
The following commit has been merged in the openafs-stable-1_8_x branch:
commit 3c93a59ab9540d2d0fb207ffb238b6830aad9f78
Author: Mark Vitale <mvitale@sinenomine.net>
Date: Tue Mar 30 18:51:39 2021 -0400
macos: AFSBackgrounder: improve detection of afs mount status
The OpenAFS preferences for MacOS provide two ways to start or stop the
cache manager:
- Preference pane button: [Startup] or [Shutdown]
- AFS Menu item: 'Startup AFS' or 'Shutdown AFS'
Only one choice (startup or shutdown) is displayed in each UI element,
based on the current state of the cache manager according to
checkAfsStatus().
Unfortunately, checkAfsStatus() determines cache manager state by
issuing a 'df' command and searching the output for AFS_FS_MOUNT "AFS".
This heuristic is fragile and easily fooled by any "AFS" string in the
output.
For example, the OpenAFS installer .dmg mounts itself as "OpenAFS". The
presence of "AFS" causes checkAfsStatus to believe that AFS is mounted.
Therefore the OpenAFS GUI will display only the "Shutdown" choice,
regardless of the true state of AFS. If AFS is already shutdown, it is
impossible to start the cache manager via the GUI until the installer
image is ejected.
Modify checkAfsStatus to use a more robust method of determining the
state of AFS: Iterate over the mounted devices to search for a mounted
AFS filesystem.
Reviewed-on: https://gerrit.openafs.org/14587
Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
Reviewed-by: Marcio Brito Barbosa <mbarbosa@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
(cherry picked from commit 4731c80609217e2594e8503a0b80f2e53ec27a6d)
Change-Id: I36683cc9763e77aa4960f9eb3e4ee297d8217efa
Reviewed-on: https://gerrit.openafs.org/16072
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Marcio Brito Barbosa <mbarbosa@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
.../DARWIN/AFSPreference/AFSPropertyManager.m | 28 ++++++++++++++++++----
1 file changed, 23 insertions(+), 5 deletions(-)
--
OpenAFS Master Repository