Merge branch 'master' of ssh://isaac.ssl.berkeley.edu/boinc-v2

This commit is contained in:
Rom Walton 2014-08-22 14:19:25 -04:00
commit fbe578ad6e
3 changed files with 11 additions and 8 deletions

View File

@ -22,7 +22,6 @@
// my developing your own stylesheet
// and customizing the header/footer functions in html/project/project.inc
require_once("../inc/db.inc");
require_once("../inc/util.inc");
require_once("../inc/news.inc");
require_once("../inc/cache.inc");
@ -182,7 +181,6 @@ if ($stopped) {
Please try again later</b>.
";
} else {
db_init();
show_nav();
}

View File

@ -317,8 +317,7 @@ if ($xml) {
";
}
$retval = db_init_aux();
if ($retval) {
if (BoincDB::get_aux(true) == null) {
echo tra("The database server is not accessible");
} else {
if (!$xml) {
@ -369,7 +368,6 @@ if ($retval) {
$gap = unserialize(get_cached_data(STATUS_PAGE_TTL, "transitioner_backlog"));
if ($gap === false) {
$min = BoincDB::get()->lookup_fields("workunit", "stdClass", "MIN(transition_time) as min", "TRUE");
//$gap = BoincDB::get()->min("workunit", "transition_time"); $gap = time()-$gap/3600;
$gap = (time() - $min->min)/3600;
if (($gap < 0) || ($min->min == 0)) {
$gap = 0;

View File

@ -109,9 +109,12 @@ int main(int argc, char *argv[])
// Expand the installer package
system("rm -dfR /tmp/BOINC.pkg");
system("rm -dfR /tmp/expanded_BOINC.pkg");
sprintf(temp, "pkgutil --expand \"%s\" /tmp/expanded_BOINC.pkg", pkgPath);
err = system(temp);
if (compareOSVersionTo(10, 9) < 0) {
sprintf(temp, "pkgutil --expand \"%s\" /tmp/expanded_BOINC.pkg", pkgPath);
err = system(temp);
}
if (err == noErr) {
GetPreferredLanguages();
}
@ -201,6 +204,10 @@ Boolean IsRestartNeeded()
uid_t boinc_master_uid = 0, boinc_project_uid = 0;
char loginName[256];
if (compareOSVersionTo(10, 9) >= 0) {
return false;
}
grp = getgrnam(boinc_master_group_name);
if (grp == NULL)
return true; // Group boinc_master does not exist