instead of grepping ps output, look for AFS in df output. not
happy with this either but it's way more reliable.
Change-Id: I73ff53bc1cc24c9484011a870546b6334ff66b49
Reviewed-on: http://gerrit.openafs.org/1410
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit
f0ce809181d19e865817200dab4fb8370bceeb59)
Reviewed-on: http://gerrit.openafs.org/1493
#define AFS_DAEMON_STARTUPSCRIPT "/Library/OpenAFS/Tools/root.client/usr/vice/etc/afs.rc"
#define AFS_DAEMON_PATH "/Library/LaunchDaemons/org.openafs.filesystems.afs.plist"
+#define AFS_FS_MOUNT "AFS"
#define AFS_DAEMON_LAUNCH_PATH "/private/var/db/openafs/etc/launchafs.sh"
/*!
@class AFSPropertyManager
// -------------------------------------------------------------------------------
-(BOOL) checkAfsStatusForStartup {
BOOL result = NO;
- NSString *fsResult = [TaskUtil executeTaskSearchingPath:@"ps" args:[NSArray arrayWithObjects:@"-ef", nil]];
- result = (fsResult?([fsResult rangeOfString:@AFS_DAEMON_LAUNCH_PATH].location != NSNotFound):NO);
+ NSString *dfResult = [TaskUtil executeTaskSearchingPath:@"/bin/df" args:[NSArray arrayWithObjects:nil]];
+ result = (dfResult?([dfResult rangeOfString:@AFS_FS_MOUNT].location != NSNotFound):NO);
return result;
}