From fbd2aa2fa68390498d8df83190dae68c240ed9eb Mon Sep 17 00:00:00 2001 From: Claudio Bisegni Date: Mon, 5 Oct 2009 13:42:27 +0200 Subject: [PATCH] OSX Launchd Startup Manage with Preference Pane OpenAFS preference pane has been updated to manage the new launchd startup mode. Has been delete the custom startup and shutdown file now is user the /Library/OpenAFS/Tools/root.client/usr/vice/etc/afs.rc OpenAFS.postinstall has been modified to remove the old existing /Library/StartupItems/OpenAFS directory OpenAFS.pre_upgrade has been modified to shutdown daemon, if it is runnig, and remove the old preference pane to permit the one to be installed Reviewed-on: http://gerrit.openafs.org/578 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit f8cf2a44ab2e896b3c22c9a9e39cc9ade839545e) Change-Id: I40540cff972606d2fca87ebb601022fd305cf43d Reviewed-on: http://gerrit.openafs.org/968 --- src/packaging/MacOS/.gitignore | 1 + src/packaging/MacOS/OpenAFS.post_install | 2 +- src/packaging/MacOS/OpenAFS.pre_upgrade | 17 +- .../DARWIN/AFSPreference/AFSCommanderPref.m | 75 +- .../DARWIN/AFSPreference/AFSPropertyManager.h | 7 +- .../DARWIN/AFSPreference/AFSPropertyManager.m | 67 +- .../English.lproj/OpenAFSPreference.xib | 1175 +++++++++++++---- .../OpenAFS.xcodeproj/project.pbxproj | 12 - .../DARWIN/AFSPreference/PListManager.h | 9 +- .../DARWIN/AFSPreference/PListManager.m | 22 + src/platform/DARWIN/AFSPreference/afshlp.m | 35 +- .../DARWIN/AFSPreference/start_afs.sh | 111 -- src/platform/DARWIN/AFSPreference/stop_afs.sh | 21 - 13 files changed, 1015 insertions(+), 539 deletions(-) delete mode 100755 src/platform/DARWIN/AFSPreference/start_afs.sh delete mode 100755 src/platform/DARWIN/AFSPreference/stop_afs.sh diff --git a/src/packaging/MacOS/.gitignore b/src/packaging/MacOS/.gitignore index 90a6fcbf9..096825680 100644 --- a/src/packaging/MacOS/.gitignore +++ b/src/packaging/MacOS/.gitignore @@ -12,4 +12,5 @@ .DS_Store *.mode1v3 *.pbxuser +*.dmg build/ diff --git a/src/packaging/MacOS/OpenAFS.post_install b/src/packaging/MacOS/OpenAFS.post_install index 72047bd08..2864a9494 100644 --- a/src/packaging/MacOS/OpenAFS.post_install +++ b/src/packaging/MacOS/OpenAFS.post_install @@ -123,5 +123,5 @@ elif [ -e config/afssettings ]; then fi #here we should run tools which configure the client, and then if it's enabled: -#/Library/StartupItems/OpenAFS/OpenAFS start +#start the new launchd daemon launchctl load -w /Library/LaunchDaemons/org.openafs.filesystems.afs.plist diff --git a/src/packaging/MacOS/OpenAFS.pre_upgrade b/src/packaging/MacOS/OpenAFS.pre_upgrade index aa10c37e5..bd030fc72 100644 --- a/src/packaging/MacOS/OpenAFS.pre_upgrade +++ b/src/packaging/MacOS/OpenAFS.pre_upgrade @@ -1,4 +1,8 @@ #!/bin/sh +DAEMON=/private/var/db/openafs/etc/launchafs.sh +DAEMON_LAUNCHD_SCRIPT=/Library/LaunchDaemons/org.openafs.filesystems.afs.plist +DAEMON_UP=$(ps -ef | grep "$DAEMON_NAME" | grep -v grep | wc -l) +PREFERENCE_PANE=/Library/PreferencePanes/OpenAFS.prefPane cd /var/db/openafs/etc # only do these checks if we're upgrading from a pre-1.2.7 @@ -27,6 +31,17 @@ if [ -f /Library/StartupItems/OpenAFS/OpenAFS ]; then /Library/StartupItems/OpenAFS/OpenAFS stop else if [ -f /Library/LaunchDaemons/org.openafs.filesystems.afs.plist ]; then - launchctl stop org.openafs.filesystems.afs + if ps ax | grep -v grep | grep $DAEMON > /dev/null + then + launchctl stop org.openafs.filesystems.afs + else + echo "$DAEMON is not running" + fi + + launchctl unload -w $DAEMON_LAUNCHD_SCRIPT fi fi + +if [ -d /Library/PreferencePanes/OpenAFS.prefPane ]; then + rm -R /Library/PreferencePanes/OpenAFS.prefPane +fi diff --git a/src/platform/DARWIN/AFSPreference/AFSCommanderPref.m b/src/platform/DARWIN/AFSPreference/AFSCommanderPref.m index a3222182a..fca2b9783 100644 --- a/src/platform/DARWIN/AFSPreference/AFSCommanderPref.m +++ b/src/platform/DARWIN/AFSPreference/AFSCommanderPref.m @@ -579,46 +579,18 @@ // ------------------------------------------------------------------------------- - (IBAction) startStopAfs:(id) sender { - OSStatus status = noErr; - NSString *afsdPath = [TaskUtil searchExecutablePath:@"afsd"]; - //NSString *startStopScript = nil; - NSString *rootHelperApp = nil; BOOL currentAfsState = NO; - @try { - if(afsdPath == nil) return; currentAfsState = [afsProperty checkAfsStatus]; - rootHelperApp = [[self bundle] pathForResource:@"afshlp" ofType:@""]; - - //[startStopScript setString: resourcePath]; - NSLog(@"Launch repair HelperTool"); - //Check helper app - [self repairHelperTool]; - // make the parameter to call the root helper app - status = [[AuthUtil shared] autorize]; - if(status == noErr){ - if(currentAfsState){ - //shutdown afs - NSLog(@"Shutting down afs"); - NSMutableString *afsKextPath = [[NSMutableString alloc] initWithCapacity:256]; - [afsKextPath setString:[afsProperty path]]; - [afsKextPath appendString:@"/etc/afs.kext"]; - - //Make the array for arguments - NSLog(@"executeTaskWithAuth"); - const char *stopAfsArgs[] = {"stop_afs", [afsKextPath UTF8String], [afsdPath UTF8String], 0L}; - [[AuthUtil shared] execUnixCommand:[rootHelperApp UTF8String] - args:stopAfsArgs - output:nil]; - - } else { - NSLog(@"Starting up afs"); - const char *startAfsArgs[] = {[[[self bundle] pathForResource:@"start_afs" ofType:@"sh"] UTF8String], [[afsProperty path] UTF8String], [afsdPath UTF8String], 0L}; - [[AuthUtil shared] execUnixCommand:[rootHelperApp UTF8String] - args:startAfsArgs - output:nil]; - } + if(currentAfsState){ + //shutdown afs + NSLog(@"Shutting down afs"); + [afsProperty shutdown]; + } else { + //Start afs + NSLog(@"Starting up afs"); + [afsProperty startup]; } [self refreshGui:nil]; } @@ -638,6 +610,7 @@ [self setAfsStatus]; [tokensButton setEnabled:afsIsUp]; [unlogButton setEnabled:afsIsUp]; + } // ------------------------------------------------------------------------------- @@ -769,32 +742,13 @@ - (IBAction) afsStartupSwitchEvent:(id) sender { NSString *rootHelperApp = [[self bundle] pathForResource:@"afshlp" ofType:@""]; //get the new state - NSString *afsdPath = [TaskUtil searchExecutablePath:@"afsd"]; - NSString *afsStartupScriptPath = [[self bundle] pathForResource:@"start_afs" ofType:@"sh"]; startAFSAtLogin = [checkButtonAfsAtBootTime state]; - const char *startAfsArgs[] = {"load", "-w", [AFS_STARTUP_CONTROL_FILE UTF8String], 0L}; - const char *stopAfsArgs[] = {"unload", "-w", [AFS_STARTUP_CONTROL_FILE UTF8String], 0L}; - const char *launchctlExecutable = "/bin/launchctl"; - /* [PListManager manageAfsStartupLaunchdFile:startAFSAtLogin - afsStartupScript:afsStartupScriptPath - afsBasePath:[afsProperty path] afsdPath:afsdPath]; - */ - const char *startupConfigureOption[] = {"start_afs_at_startup", [afsStartupScriptPath UTF8String], [afsdPath UTF8String], [[afsProperty path] UTF8String], 0L}; + const char *startupConfigureOption[] = {"start_afs_at_startup", startAFSAtLogin?"enable":"disable", 0L}; if([[AuthUtil shared] autorize] == noErr) { - if(startAFSAtLogin) { - [[AuthUtil shared] execUnixCommand:[rootHelperApp UTF8String] - args:startupConfigureOption - output:nil]; - - [[AuthUtil shared] execUnixCommand:launchctlExecutable - args:startAfsArgs - output:nil]; - } else { //now disable the launchd configuration - [[AuthUtil shared] execUnixCommand:launchctlExecutable - args:stopAfsArgs + [[AuthUtil shared] execUnixCommand:[rootHelperApp UTF8String] + args:startupConfigureOption output:nil]; - } } } @@ -934,6 +888,9 @@ -(void) setAfsStatus { BOOL afsIsUp = [afsProperty checkAfsStatus]; + BOOL afsEnabledAtStartup = [afsProperty checkAfsStatusForStartup]; + + [((NSButton *)startStopButton) setTitle: (afsIsUp?kAfsButtonShutdown:kAfsButtonStartup)]; NSMutableAttributedString *colorTitle =[[NSMutableAttributedString alloc] initWithAttributedString:[((NSButton *)startStopButton) attributedTitle]]; @@ -944,7 +901,7 @@ range:titleRange]; [((NSButton *)startStopButton) setAttributedTitle:colorTitle]; - + [checkButtonAfsAtBootTime setState:afsEnabledAtStartup]; if(afsIsUp) { [self startTimer]; } else { diff --git a/src/platform/DARWIN/AFSPreference/AFSPropertyManager.h b/src/platform/DARWIN/AFSPreference/AFSPropertyManager.h index 9b1ab28ca..7a733dfc5 100644 --- a/src/platform/DARWIN/AFSPreference/AFSPropertyManager.h +++ b/src/platform/DARWIN/AFSPreference/AFSPropertyManager.h @@ -10,6 +10,10 @@ #import "DBCellElement.h" #import "FileUtil.h" + +#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_DAEMON_LAUNCH_PATH "/private/var/db/openafs/etc/launchafs.sh" /*! @class AFSPropertyManager @abstract AFS Manage Class @@ -379,7 +383,7 @@ @abstract Stop The AFS */ -(void) shutdown; - +-(void) startup; -(void) scanIpForCell:(DBCellElement*) cellElement allIP:(NSString*)allIP; -(void) backupConfigurationFiles; -(void) backupFile:(NSString*)localAfsFilePath; @@ -388,6 +392,7 @@ -(void) installConfigurationFile:(NSString*)srcConfFile destPath:(NSString*) destPath; -(NSArray*) getTokenList; -(BOOL) checkAfsStatus; +-(BOOL) checkAfsStatusForStartup; -(void) klog:(NSString*)uName uPwd:(NSString*)uPwd cell:(NSString*)theCell; -(void) aklog:(NSString*)theCell noKerberosCall:(BOOL)krb5CallEnable; -(void) getTokens:(BOOL)klogAklogFlag usr:(NSString*)usr pwd:(NSString*)pwd; diff --git a/src/platform/DARWIN/AFSPreference/AFSPropertyManager.m b/src/platform/DARWIN/AFSPreference/AFSPropertyManager.m index e18925a1a..4da7e66cb 100644 --- a/src/platform/DARWIN/AFSPreference/AFSPropertyManager.m +++ b/src/platform/DARWIN/AFSPreference/AFSPropertyManager.m @@ -1082,32 +1082,14 @@ // ------------------------------------------------------------------------------- -(void) shutdown { - NSMutableString *filePath = [[NSMutableString alloc] initWithCapacity:256]; @try { - if([[AuthUtil shared] autorize] != noErr) - return; - - /*const char *args0[] = {"stop", 0L}; - [[AuthUtil shared] execUnixCommand:"/Library/StartupItems/OpenAFS/OpenAFS_stop" - args:args0 - output:0L];*/ - - // unmount afs - const char *args1[] = {"-f", "/afs", 0L}; - [[AuthUtil shared] execUnixCommand:"/sbin/umount" - args:args1 - output:0L]; - - const char *args2[] = {"-shutdown", 0L}; - [[AuthUtil shared] execUnixCommand:"/usr/sbin/afsd" - args:args2 - output:0L]; - - const char *args3[] = {[filePath UTF8String], 0L}; - [[AuthUtil shared] execUnixCommand:"/sbin/kextunload" - args:args3 - output:0L]; - + const char *stopArgs[] = {"stop", 0L}; + if([[AuthUtil shared] autorize] == noErr) { + [[AuthUtil shared] execUnixCommand:AFS_DAEMON_STARTUPSCRIPT + args:stopArgs + output:nil]; + } + } @catch (NSException * e) { @throw e; @@ -1119,6 +1101,30 @@ } + +// ------------------------------------------------------------------------------- +// -(void) shutdown +// ------------------------------------------------------------------------------- +-(void) startup +{ + @try { + const char *startArgs[] = {"start", 0L}; + if([[AuthUtil shared] autorize] == noErr) { + [[AuthUtil shared] execUnixCommand:AFS_DAEMON_STARTUPSCRIPT + args:startArgs + output:nil]; + } + + } + @catch (NSException * e) { + @throw e; + } + @finally { + + } + + +} // ------------------------------------------------------------------------------- // -(void) saveConfigurationFiles // ------------------------------------------------------------------------------- @@ -1347,6 +1353,7 @@ if(filePath) [filePath release]; } } + // ------------------------------------------------------------------------------- // checkAfsStatus:[NSArray arrayWithObjects:@"checkserver", nil]; // ------------------------------------------------------------------------------- @@ -1358,6 +1365,16 @@ return result; } +// ------------------------------------------------------------------------------- +// checkAfsStatus:[NSArray arrayWithObjects:@"checkserver", nil]; +// ------------------------------------------------------------------------------- +-(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); + return result; +} + // ------------------------------------------------------------------------------- // makeChaceParamString // ------------------------------------------------------------------------------- diff --git a/src/platform/DARWIN/AFSPreference/English.lproj/OpenAFSPreference.xib b/src/platform/DARWIN/AFSPreference/English.lproj/OpenAFSPreference.xib index 15a6313aa..582e5d6e8 100644 --- a/src/platform/DARWIN/AFSPreference/English.lproj/OpenAFSPreference.xib +++ b/src/platform/DARWIN/AFSPreference/English.lproj/OpenAFSPreference.xib @@ -1,14 +1,17 @@ - + 1050 - 9J61 - 680 - 949.46 - 353.00 + 10B504 + 732 + 1038.2 + 437.00 + + com.apple.InterfaceBuilder.CocoaPlugin + 732 + YES - YES @@ -16,7 +19,7 @@ YES - + YES @@ -39,7 +42,7 @@ 2 {{423, 652}, {595, 486}} 1081606144 - PDwgZG8gbm90IGxvY2FsaXplID4+A + << do not localize >> NSWindow View @@ -55,6 +58,7 @@ 256 {{17, 1}, {304, 14}} + YES 67239424 @@ -62,7 +66,7 @@ LucidaGrande - 9.000000e+00 + 9 3614 @@ -72,7 +76,7 @@ controlColor 3 - MC42NjY2NjY2OQA + MC42NjY2NjY2ODY1AA @@ -101,6 +105,7 @@ 268 {{13, 7}, {109, 28}} + YES 67239424 @@ -108,7 +113,7 @@ On LucidaGrande - 1.100000e+01 + 11 3100 @@ -128,6 +133,7 @@ 265 {{526, 9}, {21, 23}} + YES -2080244224 @@ -135,7 +141,7 @@ LucidaGrande - 1.300000e+01 + 13 1044 @@ -152,9 +158,10 @@ - -2147483380 + 268 {{138, 13}, {117, 18}} + YES 67239424 @@ -180,10 +187,12 @@ {{1, 1}, {562, 43}} + {{17, 423}, {564, 45}} + {0, 0} 67239424 @@ -201,7 +210,7 @@ 3 - MCAwLjgwMDAwMDAxAA + MCAwLjgwMDAwMDAxMTkAA @@ -211,7 +220,7 @@ NO 1 - MCAwIDAgMC40MQA + MCAwIDAgMC40MDk5OTk5OTY0AA @@ -219,6 +228,7 @@ 274 {{13, 15}, {572, 401}} + YES @@ -245,6 +255,7 @@ 256 {516, 140} + 1 YES @@ -252,6 +263,7 @@ 256 {516, 17} + @@ -259,21 +271,22 @@ -2147483392 {{-22, 0}, {12, 17}} + YES - 5.130000e+02 - 4.109668e+01 - 1.000000e+03 + 513 + 41.0966796875 + 1000 - 75628032 - 0 + 75628096 + 2048 Token 3 - MC4zMzMzMzI5OQA + MC4zMzMzMzI5ODU2AA 6 @@ -301,8 +314,8 @@ - 3.000000e+00 - 2.000000e+00 + 3 + 2 6 @@ -313,17 +326,21 @@ MC41AA - 1.200000e+01 + 12 -692060160 + + 2 5 15 0 YES + 0 {{1, 17}, {516, 140}} + @@ -334,20 +351,22 @@ -2147483392 {{494, 17}, {11, 80}} + 256 _doScroller: - 8.791209e-01 + 0.87912088632583618 -2147483392 {{1, 97}, {505, 11}} + 257 _doScroller: - 9.980198e-01 + 0.99801981449127197 @@ -358,6 +377,7 @@ {{1, 0}, {516, 17}} + @@ -367,6 +387,7 @@ {{17, 199}, {518, 158}} + 562 @@ -381,6 +402,7 @@ 265 {{329, 164}, {80, 28}} + YES 67239424 @@ -404,6 +426,7 @@ 265 {{407, 164}, {133, 28}} + YES 67239424 @@ -427,6 +450,7 @@ 268 {{14, 172}, {86, 18}} + YES 67239424 @@ -459,6 +483,7 @@ 268 {{5, 32}, {75, 18}} + YES 67239424 @@ -481,6 +506,7 @@ 268 {{5, 12}, {167, 18}} + YES 67239424 @@ -503,6 +529,7 @@ 268 {{5, 52}, {170, 18}} + YES 67239424 @@ -523,10 +550,12 @@ {{1, 1}, {193, 78}} + {{113, 97}, {195, 94}} + {0, 0} 67239424 @@ -536,7 +565,7 @@ 3 - MCAwLjgwMDAwMDAxAA + MCAwLjgwMDAwMDAxMTkAA @@ -550,6 +579,7 @@ 268 {{14, 152}, {96, 18}} + YES 67239424 @@ -570,6 +600,7 @@ {{10, 25}, {552, 363}} + Tokens @@ -603,9 +634,9 @@ 130560 0 search + _searchFieldSearch: - 138690815 0 @@ -620,7 +651,7 @@ YES YES - + YES AXDescription NSAccessibilityEncodedAttributesValueType @@ -628,7 +659,7 @@ YES cancel - + @@ -673,13 +704,13 @@ 134348800 + - 1 + 1 -2038021889 35 LucidaGrande - 1.100000e+01 + 11 16 @@ -700,8 +731,8 @@ 134348800 - - 2 + 2 -2038021889 35 @@ -789,12 +820,12 @@ YES 0 - 4.700000e+01 - 1.000000e+01 - 3.402823e+38 + 47 + 10 + 3.4028230607370965e+38 - 75628032 - 0 + 75628096 + 2048 Default @@ -827,12 +858,12 @@ 1 - 4.700000e+01 - 1.000000e+01 - 3.402823e+38 + 47 + 10 + 3.4028230607370965e+38 - 75628032 - 0 + 75628096 + 2048 Tokens @@ -860,17 +891,17 @@ 2 - 1.670000e+02 - 4.000000e+01 - 1.000000e+03 + 167 + 40 + 1000 - 75628032 - 0 + 75628096 + 2048 Name 3 - MC4zMzMzMzI5OQA + MC4zMzMzMzI5ODU2AA @@ -889,12 +920,12 @@ 3 - 2.430000e+02 - 6.509082e+01 - 1.000000e+03 + 243 + 65.0908203125 + 1000 - 67239424 - 0 + 75628096 + 2048 Description @@ -914,17 +945,20 @@ - 3.000000e+00 - 2.000000e+00 + 3 + 2 - 1.500000e+01 + 15 1522532352 + + 1 4 15 0 YES + 0 {{1, 17}, {516, 271}} @@ -942,7 +976,7 @@ 256 _doScroller: - 9.473684e-01 + 0.94736838340759277 @@ -952,8 +986,8 @@ 257 _doScroller: - 1.000000e+00 - 9.942197e-01 + 1 + 0.99421972036361694 @@ -997,7 +1031,7 @@ 1 - MCAwLjEwOTg1MTg0IDEAA + MCAwLjEwOTg1MTgzNzIgMQA @@ -1034,7 +1068,7 @@ 67239488 272630784 - TsKwIHN0YXQgY2hhY2hlIGVudHJ5A + N° stat chache entry @@ -1050,15 +1084,16 @@ -1804468671 272761856 - + YES - + YES allowsFloats formatterBehavior + locale minimum minimumIntegerDigits numberStyle @@ -1066,11 +1101,14 @@ YES - - - + + + + + + - + # @@ -1078,25 +1116,19 @@ #0000 - - - - - - + + NaN - + YES - - YES - + YES - + 0 0 @@ -1114,7 +1146,7 @@ , . NO - YES + NO YES @@ -1142,20 +1174,22 @@ YES - + YES allowsFloats formatterBehavior + locale minimum minimumIntegerDigits positiveFormat YES - - - - + + + + + # @@ -1163,17 +1197,13 @@ #000 - - - - - - + + NaN - + - + 3 @@ -1184,7 +1214,7 @@ , . NO - YES + NO YES @@ -1218,15 +1248,16 @@ -1804468671 272761856 - + YES - + YES allowsFloats formatterBehavior + locale maximumIntegerDigits minimum minimumIntegerDigits @@ -1234,11 +1265,12 @@ YES - - - - - + + + + + + # @@ -1246,17 +1278,13 @@ #0 - - - - - - + + NaN - + - + 3 @@ -1267,7 +1295,7 @@ , . NO - YES + NO YES @@ -1285,7 +1313,7 @@ 67239488 272630784 - TsKwIG9mIGRhZW1vbnM + N° of daemons @@ -1323,7 +1351,7 @@ 67239488 272630784 - TsKwIFZvbHVtZSBlbnRyaWVzA + N° Volume entries @@ -1339,18 +1367,19 @@ 343014977 272630784 - + YES - + YES allowsFloats formatWidth formatterBehavior generatesDecimalNumbers groupingSize + locale maximumFractionDigits maximumIntegerDigits minimum @@ -1360,16 +1389,17 @@ YES - - - - - - - - - - + + + + + + + + + + + # @@ -1377,17 +1407,13 @@ #00 - - - - - - + + NaN - + - + 3 @@ -1398,7 +1424,7 @@ , . NO - YES + NO NO @@ -1465,15 +1491,16 @@ -1804468671 272630784 - + YES - + YES allowsFloats formatterBehavior + locale minimum minimumIntegerDigits numberStyle @@ -1481,11 +1508,12 @@ YES - - - + + + + - + # @@ -1493,17 +1521,13 @@ #00000 - - - - - - + + NaN - + - + 3 @@ -1514,7 +1538,7 @@ , . NO - YES + NO YES @@ -1555,14 +1579,14 @@ afs needs to be restarted LucidaGrande - 1.000000e+01 + 10 16 1 - MSAwLjAyNDA1ODExNSAwLjAxMjI2ODU0MwA + MSAwLjAyNDA1ODExNDc0IDAuMDEyMjY4NTQzMjQAA @@ -1648,7 +1672,7 @@ 3 - MCAwLjgwMDAwMDAxAA + MCAwLjgwMDAwMDAxMTkAA @@ -1703,17 +1727,17 @@ YES - 8.400000e+01 - 4.000000e+01 - 1.000000e+03 + 84 + 40 + 1000 - 75628032 - 0 + 75628096 + 2048 Mount Name 3 - MC4zMzMzMzI5OQA + MC4zMzMzMzI5ODU2AA @@ -1732,12 +1756,12 @@ - 4.110000e+02 - 4.000000e+01 - 1.000000e+03 + 411 + 40 + 1000 - 75628032 - 0 + 75628096 + 2048 Mount Path @@ -1758,17 +1782,20 @@ - 3.000000e+00 - 2.000000e+00 + 3 + 2 - 1.700000e+01 + 17 -557842432 + + 2 4 15 0 YES + 0 {{1, 17}, {501, 283}} @@ -1785,8 +1812,8 @@ _doScroller: - 3.700000e+01 - 1.947368e-01 + 37 + 0.1947367936372757 @@ -1796,7 +1823,7 @@ 1 _doScroller: - 5.714286e-01 + 0.57142859697341919 @@ -1910,6 +1937,7 @@ 289 {{323, 3}, {258, 11}} + YES 68288064 @@ -1917,7 +1945,7 @@ afs version LucidaGrande - 9.000000e+00 + 9 16 @@ -1928,6 +1956,7 @@ {595, 486} + {{0, 0}, {1920, 1178}} {3.40282e+38, 3.40282e+38} @@ -1981,16 +2010,17 @@ - 6.620000e+02 + 662 1 2913 + 0 + - YES - + YES NSBackgroundColor NSColor @@ -2011,10 +2041,10 @@ - + YES - + YES NSColor NSUnderline @@ -2025,7 +2055,7 @@ 1 MCAwIDEAA - + @@ -2055,18 +2085,18 @@ 256 _doScroller: - 1.000000e+00 + 1 - 256 + -2147483392 {{-100, -100}, {87, 18}} 257 _doScroller: - 1.000000e+00 - 9.456522e-01 + 1 + 0.94565218687057495 {{20, 40}, {675, 425}} @@ -2583,9 +2613,7 @@ YES 0 - - YES - + @@ -2593,7 +2621,7 @@ -2 - RmlsZSdzIE93bmVyA + File's Owner -1 @@ -3661,10 +3689,8 @@ YES - + YES - -1.IBPluginDependency - -2.IBPluginDependency -3.IBPluginDependency -3.ImportedFromIB2 101.IBPluginDependency @@ -3684,6 +3710,7 @@ 1199.IBPluginDependency 1199.ImportedFromIB2 12.IBEditorWindowLastContentRect + 12.IBPluginDependency 12.IBViewEditorWindowController.showingBoundsRectangles 12.IBViewEditorWindowController.showingLayoutRectangles 12.IBWindowTemplateEditedContentRect @@ -3826,6 +3853,7 @@ 207.IBPluginDependency 207.ImportedFromIB2 208.IBEditorWindowLastContentRect + 208.IBPluginDependency 208.IBWindowTemplateEditedContentRect 208.ImportedFromIB2 208.windowTemplate.hasMinSize @@ -3839,7 +3867,6 @@ 215.ImportedFromIB2 216.IBPluginDependency 216.ImportedFromIB2 - 224.IBPluginDependency 224.ImportedFromIB2 265.IBPluginDependency 265.ImportedFromIB2 @@ -3877,6 +3904,7 @@ 408.IBAttributePlaceholdersKey 408.IBPluginDependency 408.ImportedFromIB2 + 411.IBNumberFormatterLocalizesFormatMetadataKey 411.IBPluginDependency 411.ImportedFromIB2 413.IBPluginDependency @@ -3884,6 +3912,7 @@ 415.IBAttributePlaceholdersKey 415.IBPluginDependency 415.ImportedFromIB2 + 417.IBNumberFormatterLocalizesFormatMetadataKey 417.IBPluginDependency 417.ImportedFromIB2 425.IBPluginDependency @@ -3892,87 +3921,89 @@ 475.ImportedFromIB2 6.IBPluginDependency 6.ImportedFromIB2 + 740.IBNumberFormatterLocalizesFormatMetadataKey 740.IBPluginDependency 740.ImportedFromIB2 + 741.IBNumberFormatterLocalizesFormatMetadataKey 741.IBPluginDependency 741.ImportedFromIB2 + 742.IBNumberFormatterLocalizesFormatMetadataKey 742.IBPluginDependency 742.ImportedFromIB2 YES com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + + {{369, 135}, {595, 486}} com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{70, 135}, {595, 486}} - - - {{70, 135}, {595, 486}} - - + + + {{369, 135}, {595, 486}} + + {3.40282e+38, 3.40282e+38} {0, 0} com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + ToolTip @@ -3982,7 +4013,7 @@ com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -4027,29 +4058,29 @@ Zm9yIGRlYnVnZ2luZyBhcyBpdCBwcmludHMgYSBMT1Qgb2YgaW5mb3JtYXRpb24uCg com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -4077,35 +4108,35 @@ Zm9yIGRlYnVnZ2luZyBhcyBpdCBwcmludHMgYSBMT1Qgb2YgaW5mb3JtYXRpb24uCg com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - + {{0, 510}, {715, 485}} + com.apple.InterfaceBuilder.CocoaPlugin {{0, 510}, {715, 485}} - - + + {3.40282e+38, 3.40282e+38} {0, 0} com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + ToolTip @@ -4115,9 +4146,9 @@ Zm9yIGRlYnVnZ2luZyBhcyBpdCBwcmludHMgYSBMT1Qgb2YgaW5mb3JtYXRpb24uCg com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + ToolTip @@ -4127,15 +4158,15 @@ Zm9yIGRlYnVnZ2luZyBhcyBpdCBwcmludHMgYSBMT1Qgb2YgaW5mb3JtYXRpb24uCg com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + ToolTip @@ -4145,9 +4176,9 @@ Zm9yIGRlYnVnZ2luZyBhcyBpdCBwcmludHMgYSBMT1Qgb2YgaW5mb3JtYXRpb24uCg com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + ToolTip @@ -4157,11 +4188,12 @@ Zm9yIGRlYnVnZ2luZyBhcyBpdCBwcmludHMgYSBMT1Qgb2YgaW5mb3JtYXRpb24uCg com.apple.InterfaceBuilder.CocoaPlugin - + + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + ToolTip @@ -4171,28 +4203,30 @@ Zm9yIGRlYnVnZ2luZyBhcyBpdCBwcmludHMgYSBMT1Qgb2YgaW5mb3JtYXRpb24uCg com.apple.InterfaceBuilder.CocoaPlugin - + + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + + com.apple.InterfaceBuilder.CocoaPlugin - + + com.apple.InterfaceBuilder.CocoaPlugin - + + com.apple.InterfaceBuilder.CocoaPlugin - + YES - - YES - + YES @@ -4200,9 +4234,7 @@ Zm9yIGRlYnVnZ2luZyBhcyBpdCBwcmludHMgYSBMT1Qgb2YgaW5mb3JtYXRpb24uCg YES - - YES - + YES @@ -4218,7 +4250,7 @@ Zm9yIGRlYnVnZ2luZyBhcyBpdCBwcmludHMgYSBMT1Qgb2YgaW5mb3JtYXRpb24uCg NSPreferencePane YES - + YES addLink: addRemoveCell: @@ -4267,7 +4299,7 @@ Zm9yIGRlYnVnZ2luZyBhcyBpdCBwcmludHMgYSBMT1Qgb2YgaW5mb3JtYXRpb24uCg YES - + YES addCellButton afsCommanderView @@ -4368,7 +4400,7 @@ Zm9yIGRlYnVnZ2luZyBhcyBpdCBwcmludHMgYSBMT1Qgb2YgaW5mb3JtYXRpb24uCg NSPreferencePane YES - + YES cellPopupButton getTokenButton @@ -4401,7 +4433,7 @@ Zm9yIGRlYnVnZ2luZyBhcyBpdCBwcmludHMgYSBMT1Qgb2YgaW5mb3JtYXRpb24uCg YES - + YES infoPanel texEditInfo @@ -4430,7 +4462,7 @@ Zm9yIGRlYnVnZ2luZyBhcyBpdCBwcmludHMgYSBMT1Qgb2YgaW5mb3JtYXRpb24uCg NSObject YES - + YES cancell: save: @@ -4445,7 +4477,7 @@ Zm9yIGRlYnVnZ2luZyBhcyBpdCBwcmludHMgYSBMT1Qgb2YgaW5mb3JtYXRpb24uCg YES - + YES lynkCreationSheet textFieldLinkDestPath @@ -4463,12 +4495,398 @@ Zm9yIGRlYnVnZ2luZyBhcyBpdCBwcmludHMgYSBMT1Qgb2YgaW5mb3JtYXRpb24uCg LynkCreationController.h + + NSPreferencePane + NSObject + + IBUserSource + + + + + + YES + + NSActionCell + NSCell + + IBFrameworkSource + AppKit.framework/Headers/NSActionCell.h + + + + NSApplication + NSResponder + + IBFrameworkSource + AppKit.framework/Headers/NSApplication.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSApplicationScripting.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSColorPanel.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSHelpManager.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSPageLayout.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSUserInterfaceItemSearching.h + + + + NSBox + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSBox.h + + + + NSButton + NSControl + + IBFrameworkSource + AppKit.framework/Headers/NSButton.h + + + + NSButtonCell + NSActionCell + + IBFrameworkSource + AppKit.framework/Headers/NSButtonCell.h + + + + NSCell + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSCell.h + + + + NSControl + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSControl.h + + + + NSFormatter + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSFormatter.h + + + + NSMenu + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSMenu.h + + + + NSNumberFormatter + NSFormatter + + IBFrameworkSource + Foundation.framework/Headers/NSNumberFormatter.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSAccessibility.h + + + + NSObject + + + + NSObject + + + + NSObject + + + + NSObject + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSDictionaryController.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSDragging.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSFontManager.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSFontPanel.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSKeyValueBinding.h + + + + NSObject + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSNibLoading.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSOutlineView.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSPasteboard.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSSavePanel.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSTableView.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSToolbarItem.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSView.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSArchiver.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSClassDescription.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSError.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSFileManager.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueCoding.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueObserving.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyedArchiver.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObject.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObjectScripting.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSPortCoder.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSRunLoop.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptClassDescription.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptKeyValueCoding.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptObjectSpecifiers.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptWhoseTests.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSThread.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURL.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLConnection.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLDownload.h + + + + NSPanel + NSWindow + + IBFrameworkSource + AppKit.framework/Headers/NSPanel.h + + + + NSPopUpButton + NSButton + + IBFrameworkSource + AppKit.framework/Headers/NSPopUpButton.h + + NSPreferencePane NSObject YES - + YES _firstKeyView _initialKeyView @@ -4477,20 +4895,193 @@ Zm9yIGRlYnVnZ2luZyBhcyBpdCBwcmludHMgYSBMT1Qgb2YgaW5mb3JtYXRpb24uCg YES - id - id - id - id + NSView + NSView + NSView + NSWindow - IBUserSource - + IBFrameworkSource + PreferencePanes.framework/Headers/NSPreferencePane.h + + + + NSResponder + + IBFrameworkSource + AppKit.framework/Headers/NSInterfaceStyle.h + + + + NSResponder + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSResponder.h + + + + NSScrollView + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSScrollView.h + + + + NSScroller + NSControl + + IBFrameworkSource + AppKit.framework/Headers/NSScroller.h + + + + NSSearchField + NSTextField + + IBFrameworkSource + AppKit.framework/Headers/NSSearchField.h + + + + NSSearchFieldCell + NSTextFieldCell + + IBFrameworkSource + AppKit.framework/Headers/NSSearchFieldCell.h + + + + NSTabView + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSTabView.h + + + + NSTabViewItem + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSTabViewItem.h + + + + NSTableColumn + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSTableColumn.h + + + + NSTableHeaderView + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSTableHeaderView.h + + + + NSTableView + NSControl + + + + NSText + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSText.h + + + + NSTextField + NSControl + + IBFrameworkSource + AppKit.framework/Headers/NSTextField.h + + + + NSTextFieldCell + NSActionCell + + IBFrameworkSource + AppKit.framework/Headers/NSTextFieldCell.h + + + + NSTextView + NSText + + IBFrameworkSource + AppKit.framework/Headers/NSTextView.h + + + + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSClipView.h + + + + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSMenuItem.h + + + + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSRulerView.h + + + + NSView + NSResponder + + + + NSWindow + + IBFrameworkSource + AppKit.framework/Headers/NSDrawer.h + + + + NSWindow + NSResponder + + IBFrameworkSource + AppKit.framework/Headers/NSWindow.h + + + + NSWindow + + IBFrameworkSource + AppKit.framework/Headers/NSWindowScripting.h 0 + + com.apple.InterfaceBuilder.CocoaPlugin.macosx + + + + com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 + + + YES ../OpenAFS.xcodeproj 3 diff --git a/src/platform/DARWIN/AFSPreference/OpenAFS.xcodeproj/project.pbxproj b/src/platform/DARWIN/AFSPreference/OpenAFS.xcodeproj/project.pbxproj index cd5879949..7fa01508b 100644 --- a/src/platform/DARWIN/AFSPreference/OpenAFS.xcodeproj/project.pbxproj +++ b/src/platform/DARWIN/AFSPreference/OpenAFS.xcodeproj/project.pbxproj @@ -17,8 +17,6 @@ 3228B9B01020526900DF98DA /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 3228B9AF1020526900DF98DA /* main.m */; }; 3228B9B4102052A900DF98DA /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 327309620C2AB433008C322B /* Security.framework */; }; 3228B9BE102052BE00DF98DA /* version.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3228B9BD102052BE00DF98DA /* version.plist */; }; - 322B90450C2F0A2D0068F99A /* start_afs.sh in Resources */ = {isa = PBXBuildFile; fileRef = 322B90430C2F0A2D0068F99A /* start_afs.sh */; }; - 322B90460C2F0A2D0068F99A /* stop_afs.sh in Resources */ = {isa = PBXBuildFile; fileRef = 322B90440C2F0A2D0068F99A /* stop_afs.sh */; }; 322CEF600C211D220060D66D /* DBCellElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 322CEF5F0C211D220060D66D /* DBCellElement.m */; }; 322CEF6E0C211DCC0060D66D /* CellIp.m in Sources */ = {isa = PBXBuildFile; fileRef = 322CEF6D0C211DCC0060D66D /* CellIp.m */; }; 3231522010243E09005901AA /* AFSMenuCredentialContoller.m in Sources */ = {isa = PBXBuildFile; fileRef = 3231521A10243E09005901AA /* AFSMenuCredentialContoller.m */; }; @@ -58,8 +56,6 @@ 327756280C3053A100C15D11 /* TaskUtil.h in Headers */ = {isa = PBXBuildFile; fileRef = 327756250C3053A100C15D11 /* TaskUtil.h */; }; 327756290C3053A100C15D11 /* TaskUtil.m in Sources */ = {isa = PBXBuildFile; fileRef = 327756260C3053A100C15D11 /* TaskUtil.m */; }; 328014501025F503008E1060 /* afshlp in Resources */ = {isa = PBXBuildFile; fileRef = 49683EE40C3446380093C7C8 /* afshlp */; }; - 328014A71025FB2B008E1060 /* start_afs.sh in Resources */ = {isa = PBXBuildFile; fileRef = 322B90430C2F0A2D0068F99A /* start_afs.sh */; }; - 328014A81025FB2C008E1060 /* stop_afs.sh in Resources */ = {isa = PBXBuildFile; fileRef = 322B90440C2F0A2D0068F99A /* stop_afs.sh */; }; 32B0AFDF0C01729400272348 /* AFSPropertyManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 32B0AFDD0C01729400272348 /* AFSPropertyManager.h */; }; 32B0AFE00C01729400272348 /* AFSPropertyManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 32B0AFDE0C01729400272348 /* AFSPropertyManager.m */; }; 32B565740D8FAF62005255F2 /* NSString+search.h in Headers */ = {isa = PBXBuildFile; fileRef = 32B565720D8FAF62005255F2 /* NSString+search.h */; }; @@ -155,8 +151,6 @@ 322884020C3E45C800E778CC /* InfoController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InfoController.m; sourceTree = ""; }; 3228B9AF1020526900DF98DA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = AFSBackgrounder/main.m; sourceTree = ""; }; 3228B9BD102052BE00DF98DA /* version.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = version.plist; path = AFSBackgrounder/resource/version.plist; sourceTree = ""; }; - 322B90430C2F0A2D0068F99A /* start_afs.sh */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.sh; path = start_afs.sh; sourceTree = ""; }; - 322B90440C2F0A2D0068F99A /* stop_afs.sh */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.sh; path = stop_afs.sh; sourceTree = ""; }; 322CEF5E0C211D220060D66D /* DBCellElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DBCellElement.h; sourceTree = ""; }; 322CEF5F0C211D220060D66D /* DBCellElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DBCellElement.m; sourceTree = ""; }; 322CEF6C0C211DCC0060D66D /* CellIp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CellIp.h; sourceTree = ""; }; @@ -300,8 +294,6 @@ isa = PBXGroup; children = ( 325311CF0C44F4B100FAF2F3 /* license.rtf */, - 322B90430C2F0A2D0068F99A /* start_afs.sh */, - 322B90440C2F0A2D0068F99A /* stop_afs.sh */, 324D67FB0DA13194007E1561 /* OpenAFSPreference.xib */, 32DE81BC0DF57BDA0069A05C /* SymLinkEdit.xib */, 324D68480DA133CF007E1561 /* CredentialPanel.xib */, @@ -648,8 +640,6 @@ 3231522B10243E2C005901AA /* hasToken.png in Resources */, 3231522C10243E2C005901AA /* noToken.png in Resources */, 328014501025F503008E1060 /* afshlp in Resources */, - 328014A71025FB2B008E1060 /* start_afs.sh in Resources */, - 328014A81025FB2C008E1060 /* stop_afs.sh in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -659,8 +649,6 @@ files = ( 49AF1F480C25B52A006A046E /* InfoPlist.strings in Resources */, 49E05CAD0C2674DA002AAEF2 /* Info.plist in Resources */, - 322B90450C2F0A2D0068F99A /* start_afs.sh in Resources */, - 322B90460C2F0A2D0068F99A /* stop_afs.sh in Resources */, 3223836C0C32A96F00380547 /* Localizable.strings in Resources */, 325311D00C44F4B100FAF2F3 /* license.rtf in Resources */, 49E43D2E0C480B8200084436 /* afshlp in Resources */, diff --git a/src/platform/DARWIN/AFSPreference/PListManager.h b/src/platform/DARWIN/AFSPreference/PListManager.h index a59829487..c1fb05191 100644 --- a/src/platform/DARWIN/AFSPreference/PListManager.h +++ b/src/platform/DARWIN/AFSPreference/PListManager.h @@ -75,7 +75,14 @@ @discussion <#(comprehensive description)#> */ +(void) launchctlCommand:(BOOL)enable userDomain:(BOOL)userDomain option:(NSArray*)option plistName:(NSString*)plistName; - +/*! + @method launchctlCommand + @abstract exec the launchctl command on a particular plist job + @discussion <#(comprehensive description)#> + */ ++(void) launchctlStringCommand:(NSString*)operation + option:(NSArray*)option + plistName:(NSString*)plistName; /*! @method launchdJobState @abstract check is a job has been submitted to launchd diff --git a/src/platform/DARWIN/AFSPreference/PListManager.m b/src/platform/DARWIN/AFSPreference/PListManager.m index cba98cd9b..e6c1aa90a 100644 --- a/src/platform/DARWIN/AFSPreference/PListManager.m +++ b/src/platform/DARWIN/AFSPreference/PListManager.m @@ -303,6 +303,28 @@ args:argument]; } +// ------------------------------------------------------------------------------- +// launchctlCommand: +// ------------------------------------------------------------------------------- ++(void) launchctlStringCommand:(NSString*)operation + option:(NSArray*)option + plistName:(NSString*)plistName { + NSMutableArray *argument = [NSMutableArray array]; + + //set the load unload + [argument addObject:operation]; + + //if there are load the user custom option + if(option) [argument addObjectsFromArray:option]; + + //construct the path + [argument addObject: plistName]; + + //exec the command + [TaskUtil executeTaskSearchingPath:@"launchctl" + args:argument]; +} + // ------------------------------------------------------------------------------- // launchdJobState: // ------------------------------------------------------------------------------- diff --git a/src/platform/DARWIN/AFSPreference/afshlp.m b/src/platform/DARWIN/AFSPreference/afshlp.m index 67239395c..fe382b7b7 100644 --- a/src/platform/DARWIN/AFSPreference/afshlp.m +++ b/src/platform/DARWIN/AFSPreference/afshlp.m @@ -25,6 +25,10 @@ #import "TaskUtil.h" #import "AuthUtil.h" #import "PListManager.h" + +#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" + void stopAfs(int argc, char *argv[]); void getPath(char **selfPathPtr); void selfRepair(char *selfPath); @@ -58,32 +62,33 @@ int main(int argc, char *argv[]) // void runCommand(int argc, char *argv[]) { + setuid(0); NSString *cmdString = [NSString stringWithCString:(const char *)argv[1] encoding:NSUTF8StringEncoding]; - if(argc == 4 && [cmdString rangeOfString:@"stop_afs"].location!=NSNotFound ){ + if(argc == 2 && [cmdString rangeOfString:@"stop_afs"].location!=NSNotFound ){ NSLog(@"Stop afs from helper"); - stopAfs(argc, argv); - } else if(argc == 4 && [cmdString rangeOfString:@"start_afs"].location!=NSNotFound){ + const char *stopArgs[] = {"stop", 0L}; + [[AuthUtil shared] execUnixCommand:AFS_DAEMON_STARTUPSCRIPT + args:stopArgs + output:nil]; + + } else if(argc == 2 && [cmdString rangeOfString:@"start_afs"].location!=NSNotFound){ NSLog(@"Start afs from helper"); - setuid(0); - const char *startArgs[] = {argv[2], argv[3], 0L}; - NSLog(@"%s, %s, %s", argv[1], argv[2], argv[3]); - [[AuthUtil shared] execUnixCommand:argv[1] + const char *startArgs[] = {"start", 0L}; + [[AuthUtil shared] execUnixCommand:AFS_DAEMON_STARTUPSCRIPT args:startArgs output:nil]; + } else if(argc == 4 && [cmdString rangeOfString:@"enable_krb5_startup"].location!=NSNotFound) { NSLog(@"Manage KRB5 at login time with option %s from helper", argv[2]); - setuid(0); int arg2 = atoi(argv[2]); [PListManager krb5TiketAtLoginTime:[[NSNumber numberWithInt:arg2] boolValue]]; - - } else if(argc == 5 && [cmdString rangeOfString:@"start_afs_at_startup"].location!=NSNotFound){ - setuid(0); + } else if(argc == 3 && [cmdString rangeOfString:@"start_afs_at_startup"].location!=NSNotFound){ + BOOL enable = strcmp("enable", argv[2])==0; NSLog(@"Manage start_afs_at_startup with option %s from helper", argv[2]); - [PListManager manageAfsStartupLaunchdFile:YES - afsStartupScript:[NSString stringWithCString:argv[2] encoding:NSUTF8StringEncoding] - afsBasePath:[NSString stringWithCString:argv[4] encoding:NSUTF8StringEncoding] - afsdPath:[NSString stringWithCString:argv[3] encoding:NSUTF8StringEncoding]]; + [PListManager launchctlStringCommand:enable?@"load":@"unload" + option:[NSArray arrayWithObjects:@"-w", nil] + plistName:@AFS_DAEMON_PATH]; } } diff --git a/src/platform/DARWIN/AFSPreference/start_afs.sh b/src/platform/DARWIN/AFSPreference/start_afs.sh deleted file mode 100755 index 1cdd9c735..000000000 --- a/src/platform/DARWIN/AFSPreference/start_afs.sh +++ /dev/null @@ -1,111 +0,0 @@ -#!/bin/sh - -# start_afs.sh -# -# -# Created by Claudio Bisegni on 24/06/07. -# Copyright 2007 INFN. All rights reserved. -# -# Portions Copyright (c) 2003 Apple Computer, Inc. -# -# Updated to match standard service scripts -# Phil Holland - -. /etc/rc.common - -CheckForNetwork - -VICEETC=$1/etc -AFSD=$2 - -CONFIG=$VICEETC/config -AFSDOPT=$CONFIG/afsd.options -PACKAGE=$CONFIG/package.options -VERBOSE= -if [ -x /usr/sbin/kextstat ]; then KMODSTAT=/usr/sbin/kextstat; fi -if [ -x /usr/sbin/kmodstat ]; then KMODSTAT=/usr/sbin/kmodstat; fi - - -if [ -f $CONFIG/afs.conf ]; then - . $CONFIG/afs.conf -fi - -# Check this file second so that if users have altered the file, it will -# override the default options -if [ -f $AFSDOPT ]; then - OPTIONS=`cat $AFSDOPT` -fi - - echo "Starting OpenAFS" - - if [ -z "$OPTIONS" ] || [ "$OPTIONS" = "AUTOMATIC" ] ; then - AFSD_OPTIONS="$VERBOSE" - else - AFSD_OPTIONS="$OPTIONS $VERBOSE" - fi - - if [ "${NETWORKUP}" = "-NO-" ]; then - echo $AFSD_OPTIONS | grep -e '-dynroot' || exit - fi - -# Need the commands ps, awk, kill, sleep - PATH=${PATH}${PATH:+:}/sbin:/bin:/usr/bin - - if [ -d $VICEETC/afs.kext ]; then - echo "Loading AFS kernel extensions" - kextload $VICEETC/afs.kext - else - echo "$VICEETC/afs.kext does not exist. Skipping AFS startup." - exit 1 - fi - - if $KMODSTAT | perl -e 'exit not grep /openafs/, <>' ; then - : - else - echo "AFS kernel extensions failed to initialize. Skipping AFS startup." - exit 1 - fi - -# -# Check that all of the client configuration files exist -# - - for file in $AFSD $VICEETC/cacheinfo \ - $VICEETC/ThisCell $VICEETC/CellServDB - do - if [ ! -f ${file} ]; then - echo "${file} does not exist. Not starting AFS client." - exit 1 - fi - done - -# -# Check that the root directory for AFS (/afs) -# and the cache directory (/usr/vice/cache) both exist -# - - for dir in `awk -F: '{print $1, $2}' $VICEETC/cacheinfo` - do - if [ ! -d ${dir} ]; then - echo "${dir} does not exist. Not starting AFS client." - exit 2 - fi - done - - echo "Starting afsd" - $AFSD $AFSD_OPTIONS - -# -# From /var/db/openafs/etc/config/afs.conf, call a post-init function or -# command if it's been defined -# - $AFS_POST_INIT - -# -# Call afssettings (if it exists) to set customizable parameters -# - if [ -x $CONFIG/afssettings ]; then - sleep 2 - $CONFIG/afssettings - fi - diff --git a/src/platform/DARWIN/AFSPreference/stop_afs.sh b/src/platform/DARWIN/AFSPreference/stop_afs.sh deleted file mode 100755 index 301b8b06f..000000000 --- a/src/platform/DARWIN/AFSPreference/stop_afs.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh - -# stop_afs.sh -# -# -# Created by Claudio Bisegni on 24/06/07. -# Copyright 2007 INFN. All rights reserved. - -VICEETC=$1/etc -AFSD=$2 -echo "Stopping AFS" - -echo "Unmounting /afs" -umount -f /afs 2>&1 > /dev/console - -echo "Shutting down afsd processes" -$AFSD -shutdown 2>&1 > /dev/console - -echo "Unloading AFS kernel extensions" -kextunload $VICEETC/afs.kext 2>&1 > /dev/console - -- 2.39.5