From d500581e8d9d78284ea31e477e2fe22800910ee2 Mon Sep 17 00:00:00 2001 From: Rom Walton Date: Wed, 28 Jul 2004 01:26:36 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/boinc/; revision=3957 --- checkin_notes | 10 ++++++++++ py/Boinc/setup_project.py | 4 ++-- sched/start | 3 ++- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/checkin_notes b/checkin_notes index 897db23712..670f9aa4aa 100755 --- a/checkin_notes +++ b/checkin_notes @@ -15706,3 +15706,13 @@ Daniel 2004-07-27 client/ pers_file_xfer.C +Rom July 27 2004 + - Create a tmp folder off of the project root so tasks and stuff can begin execution + from there, it was the log folder but the problem with that, is now our log directories + are symbolic links to a local volume so when we try to traverse back up to the project + folder we are missing a bunch of folders. + + py/boinc/ + setup_project.py + sched/ + start diff --git a/py/Boinc/setup_project.py b/py/Boinc/setup_project.py index 2e1d16e7b0..79e5bc40d0 100644 --- a/py/Boinc/setup_project.py +++ b/py/Boinc/setup_project.py @@ -366,9 +366,9 @@ class Project: # TODO: that is a security risk; don't do this in the future - write # req/reply files somewhere else map(lambda dir: os.mkdir(self.dir(dir)), - [ '', 'cgi-bin', 'bin', 'upload', 'download', 'apps', self.logdir(), + [ '', 'cgi-bin', 'bin', 'templates', 'upload', 'download', 'apps', self.logdir(), 'html', 'html/cache', 'html/ops', 'html/user', 'html/project', - 'html/inc', 'html/stats', 'html/user_profile', + 'html/inc', 'html/stats', 'html/stats_tmp', 'html/user_profile', 'html/user_profile/images' ]) map(lambda dir: os.chmod(self.dir(dir), 0777), diff --git a/sched/start b/sched/start index 2a04afd694..2d758071d6 100755 --- a/sched/start +++ b/sched/start @@ -312,7 +312,7 @@ def exec_command_string(command): args = command.strip().split() # set default path for program to : args[0] = os.path.realpath(os.path.join( bin_dir, args[0] )) - os.chdir(log_dir) + os.chdir(tmp_dir) try: if contains_shell_characters(command): os.execl('/bin/sh', 'sh', '-c', ' '.join(args)) @@ -682,6 +682,7 @@ project_dir = os.path.realpath(config.config.__dict__.get('project_dir') or os.chdir(project_dir) bin_dir = get_dir('bin') cgi_bin_dir = get_dir('cgi_bin') +tmp_dir = ensure_get_dir('tmp+local_hostname') log_dir = ensure_get_dir('log_'+local_hostname) pid_dir = ensure_get_dir('pid_'+local_hostname)