[Pkg-gridengine-commits] [pkg-gridengine] 03/04: Set SGE_ARCH variable

Afif Elghraoui afif at moszumanska.debian.org
Fri Aug 11 20:50:35 UTC 2017


This is an automated email from the git hooks/post-receive script.

afif pushed a commit to branch master
in repository pkg-gridengine.

commit b5d8004dd50440847a7022a84ccb75952420769b
Author: Afif Elghraoui <afif at debian.org>
Date:   Fri Aug 11 15:25:37 2017 -0400

    Set SGE_ARCH variable
    
    Closes: #856671
---
 debian/gridengine-wrapper | 19 ++++++++++++++++---
 debian/gridengine.default |  2 ++
 2 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/debian/gridengine-wrapper b/debian/gridengine-wrapper
index 44c3247..22f9acf 100755
--- a/debian/gridengine-wrapper
+++ b/debian/gridengine-wrapper
@@ -4,13 +4,14 @@
 
 set -e
 
-# For each of SGE_ROOT, SGE_CELL:
+# For each of SGE_ROOT, SGE_CELL, SGE_ARCH:
 # 1) If the environment variable is set; use it
 # 2) If not, look in /etc/default/gridengine
 # 3) If still nothing, fall back to Debian defaults
 
 DEFAULT_SGE_ROOT=/var/lib/gridengine
 DEFAULT_SGE_CELL=default
+DEFAULT_SGE_ARCH=`/usr/share/gridengine/util/arch`
 CONFIG_PATH=/etc/default/gridengine
 PROG=`basename $0`
 
@@ -24,6 +25,10 @@ if [ ! -z "${SGE_CELL}" ]; then
     _SAVED_SGE_CELL="${SGE_CELL}"
 fi
 
+if [ ! -z "${SGE_ARCH}" ]; then
+    _SAVED_SGE_ARCH="${SGE_ARCH}"
+fi
+
 # Read from our config file, this will set SGE_ROOT and/or SGE_CELL if
 # appropriate
 
@@ -40,6 +45,10 @@ if [ -z "${SGE_CELL}" ]; then
     SGE_CELL="${DEFAULT_SGE_CELL}"
 fi
 
+if [ -z "${SGE_ARCH}" ]; then
+    SGE_ARCH="${DEFAULT_SGE_ARCH}"
+fi
+
 # If we had some environment variables, these should override
 # anything else we were given so clobber it all again
 
@@ -51,9 +60,13 @@ if [ ! -z "${_SAVED_SGE_CELL}" ]; then
     SGE_CELL="${_SAVED_SGE_CELL}"
 fi
 
-unset _SAVED_SGE_ROOT _SAVED_SGE_CELL
+if [ ! -z "${_SAVED_SGE_ARCH}" ]; then
+    SGE_ARCH="${_SAVED_SGE_ARCH}"
+fi
+
+unset _SAVED_SGE_ROOT _SAVED_SGE_CELL _SAVED_SGE_ARCH
 
 # Make sure we've exported the variables we need to
-export SGE_ROOT SGE_CELL
+export SGE_ROOT SGE_CELL SGE_ARCH
 
 exec /usr/lib/gridengine/${PROG} "$@"
diff --git a/debian/gridengine.default b/debian/gridengine.default
index 11d65f4..44916bd 100644
--- a/debian/gridengine.default
+++ b/debian/gridengine.default
@@ -14,3 +14,5 @@ SGE_ROOT=/var/lib/gridengine
 # SGE_CELL will default to default
 SGE_CELL=default
 
+# SGE host architecture string
+SGE_ARCH=`"$SGE_ROOT/util/arch"`

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gridengine/pkg-gridengine.git



More information about the Pkg-gridengine-commits mailing list