summaryrefslogtreecommitdiff
path: root/sysutils/sge61
diff options
context:
space:
mode:
authorBrooks Davis <brooks@FreeBSD.org>2008-02-15 00:09:33 +0000
committerBrooks Davis <brooks@FreeBSD.org>2008-02-15 00:09:33 +0000
commit328e80e60bacdef81c11cc69288af562cfc6939a (patch)
tree38ce95672dcbd999ce8524d5e53896b8a94c0ef3 /sysutils/sge61
parentUpdate to 0.5.8.4. (diff)
Attempt to make execd startup more reliable by creating the spool directory
and per-host directories before starting execd.
Notes
Notes: svn path=/head/; revision=207219
Diffstat (limited to 'sysutils/sge61')
-rw-r--r--sysutils/sge61/Makefile1
-rw-r--r--sysutils/sge61/files/sge.sh.in22
2 files changed, 19 insertions, 4 deletions
diff --git a/sysutils/sge61/Makefile b/sysutils/sge61/Makefile
index 360d897a934d..09c427e775bd 100644
--- a/sysutils/sge61/Makefile
+++ b/sysutils/sge61/Makefile
@@ -7,6 +7,7 @@
PORTNAME= sge
PORTVERSION= ${SGE_VERSION}
+PORTREVISION= 1
CATEGORIES= sysutils parallel
MASTER_SITES= http://gridengine.sunsource.net/files/documents/7/161/:src \
http://gridengine.sunsource.net/download/SGE61/:bin \
diff --git a/sysutils/sge61/files/sge.sh.in b/sysutils/sge61/files/sge.sh.in
index f7e29e487aa0..6eda1136c375 100644
--- a/sysutils/sge61/files/sge.sh.in
+++ b/sysutils/sge61/files/sge.sh.in
@@ -14,7 +14,7 @@
. %%RC_SUBR%%
-SGE_ROOT=%%PREFIX%%/%%SGE_BASE%%
+export SGE_ROOT=%%PREFIX%%/%%SGE_BASE%%
name="sge"
start_cmd="sge_start"
@@ -26,6 +26,17 @@ sge_start()
${sgemaster_script} start
fi
if checkyesno sge_execd_enable; then
+ host=`hostname`
+ execd_spool_dir=${execd_spool_dir:-`${qconf} -sconf ${host} 2>/dev/null | awk '($1 == "execd_spool_dir") {print $2}'`}
+ execd_spool_dir=${execd_spool_dir:-`${qconf} -sconf global 2>/dev/null | awk '($1 == "execd_spool_dir") {print $2}'`}
+ if [ -n "${execd_spool_dir}" ]; then
+ mkdir -p ${execd_spool_dir}
+ mkdir -p ${execd_spool_dir}/${host%%.*}
+ mkdir -p ${execd_spool_dir}/${host%%.*}/active_jobs
+ mkdir -p ${execd_spool_dir}/${host%%.*}/jobs
+ mkdir -p ${execd_spool_dir}/${host%%.*}/job_scripts
+ chown -R sgeadmin ${execd_spool_dir}/${host%%.*}
+ fi
${sgeexecd_script} start
fi
}
@@ -44,8 +55,11 @@ load_rc_config $name
sge_qmaster_enable=${sge_qmaster_enable-NO}
sge_execd_enable=${sge_execd_enable-NO}
-sge_cell=${sge_cell:-default}
-sgemaster_script=${SGE_ROOT}/${sge_cell}/common/sgemaster
-sgeexecd_script=${SGE_ROOT}/${sge_cell}/common/sgeexecd
+export SGE_CELL=${sge_cell:-default}
+sgemaster_script=${SGE_ROOT}/${SGE_CELL}/common/sgemaster
+sgeexecd_script=${SGE_ROOT}/${SGE_CELL}/common/sgeexecd
+execd_spool_dir=${sge_execd_spool_dir-}
+sge_arch=fbsd-`uname -m`
+qconf=${SGE_ROOT}/bin/${sge_arch}/qconf
run_rc_command $*