mirror of https://github.com/BOINC/boinc.git
Mac installer: fix automatic launching of Manager after installation on OS 10.5
This commit is contained in:
parent
b076a947fc
commit
a5731f9200
|
@ -547,7 +547,8 @@ int DeleteReceipt()
|
|||
Initialize();
|
||||
|
||||
restartNeeded = IsRestartNeeded();
|
||||
// print_to_log_file("IsRestartNeeded() returned %d\n", (int)restartNeeded);
|
||||
printf("IsRestartNeeded() returned %d\n", (int)restartNeeded);
|
||||
fflush(stdout);
|
||||
|
||||
brandID = GetBrandID();
|
||||
|
||||
|
@ -568,10 +569,11 @@ int DeleteReceipt()
|
|||
for (i=0; i<15; i++) { // Wait 15 seconds max for installer to quit
|
||||
sleep (1);
|
||||
if (err == noErr)
|
||||
if (FindProcessPID(NULL, installerPID) == 0)
|
||||
if (FindProcessPID(NULL, installerPID) == 0) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// If system is set up to run BOINC Client as a daemon using launchd, launch it
|
||||
// as a daemon and allow time for client to start before launching BOINC Manager.
|
||||
|
@ -594,6 +596,9 @@ Boolean IsRestartNeeded() {
|
|||
int value;
|
||||
|
||||
restartNeededFile = fopen("/tmp/BOINC_restart_flag", "r");
|
||||
if (!restartNeededFile) {
|
||||
restartNeededFile = fopen("/private/tmp/BOINC_restart_flag", "r");
|
||||
}
|
||||
if (restartNeededFile) {
|
||||
fscanf(restartNeededFile,"%d", &value);
|
||||
fclose(restartNeededFile);
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
# post-Install Script for Macintosh BOINC Manager for OS X revised 12/6/10
|
||||
##
|
||||
|
||||
echo "Starting BOINC postinstall script"
|
||||
echo "initial directory = $PWD"
|
||||
echo "argument 1 = $1"
|
||||
|
||||
|
@ -22,7 +23,7 @@ sleep 2
|
|||
else
|
||||
"/tmp/PostInstall.app/Contents/MacOS/PostInstall" -part1
|
||||
sleep 2
|
||||
"/tmp/PostInstall.app/Contents/MacOS/PostInstall" -part2 >> stdout &
|
||||
"/tmp/PostInstall.app/Contents/MacOS/PostInstall" -part2 &
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
# post-Upgrade Script for Macintosh BOINC Manager for OS X revised 12/6/10
|
||||
##
|
||||
|
||||
echo "Starting BOINC postupgrade script"
|
||||
echo "initial directory = $PWD"
|
||||
echo "argument 1 = $1"
|
||||
|
||||
|
@ -22,7 +23,7 @@ sleep 2
|
|||
else
|
||||
"/tmp/PostInstall.app/Contents/MacOS/PostInstall" -part1
|
||||
sleep 2
|
||||
"/tmp/PostInstall.app/Contents/MacOS/PostInstall" -part >> stdout &
|
||||
"/tmp/PostInstall.app/Contents/MacOS/PostInstall" -part2 &
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
|
Loading…
Reference in New Issue