Blob Blame History Raw
diff -ur globus_gss_assist-4.0.orig/programs/grid-mapfile-add-entry.in globus_gss_assist-4.0/programs/grid-mapfile-add-entry.in
--- globus_gss_assist-4.0.orig/programs/grid-mapfile-add-entry.in	2006-01-19 06:56:02.000000000 +0100
+++ globus_gss_assist-4.0/programs/grid-mapfile-add-entry.in	2008-10-17 19:56:21.000000000 +0200
@@ -20,16 +20,16 @@
 # grid-mapfile-add-entry
 #
 
-if test -z "${GLOBUS_LOCATION}"; then
-    echo ""
-    echo "ERROR: Please set GLOBUS_LOCATION to the Globus installation directory before"
-    echo "running this script"
-    echo ""
+if test -f ${GLOBUS_LOCATION:-/usr}/share/globus/globus-script-initializer; then
+    . ${GLOBUS_LOCATION:-/usr}/share/globus/globus-script-initializer
+elif test -f ${GLOBUS_LOCATION:-/usr}/libexec/globus-script-initializer; then
+    . ${GLOBUS_LOCATION:-/usr}/libexec/globus-script-initializer
+else
+    echo "ERROR: Please set GLOBUS_LOCATION to the Globus installation directory before" 1>&2
+    echo "running this script" 1>&2
     exit 1
 fi
-
-. ${GLOBUS_LOCATION}/libexec/globus-script-initializer
-globus_source ${GLOBUS_LOCATION}/libexec/globus-sh-tools.sh
+globus_source ${libexecdir}/globus-sh-tools.sh
 
 PROGRAM_NAME=`echo $0 | ${GLOBUS_SH_SED-sed} 's|.*/||g'`
 
@@ -231,9 +231,19 @@
 
 $ECHO_DRYRUN "Verifying that Local Name(s)=($ln) are legitimate local accounts."
 
+if test -x ${sbindir}/globus-is-local-user; then
+    globus_is_local_user=${sbindir}/globus-is-local-user
+elif test -x ${libexecdir}/globus-is-local-user; then
+    globus_is_local_user=${libexecdir}/globus-is-local-user
+else
+    echo "ERROR: Unable to find globus-is-local-user" 1>&2
+    Cleanup
+    exit 1
+fi
+
 for name in $ln ; do
     $ECHO_DRYRUN "Checking ln(s)=$name"
-    ${libexecdir}/globus-is-local-user $name
+    ${globus_is_local_user} $name
     if  [ "$?" -eq 0 ] ; then
         $ECHO_DRYRUN "Local Name=$name does exist"
     else
diff -ur globus_gss_assist-4.0.orig/programs/grid-mapfile-delete-entry.in globus_gss_assist-4.0/programs/grid-mapfile-delete-entry.in
--- globus_gss_assist-4.0.orig/programs/grid-mapfile-delete-entry.in	2006-01-19 06:56:02.000000000 +0100
+++ globus_gss_assist-4.0/programs/grid-mapfile-delete-entry.in	2008-10-17 19:56:26.000000000 +0200
@@ -21,16 +21,16 @@
 # grid-mapfile-delete-entry
 #
 
-if test -z "${GLOBUS_LOCATION}"; then
-    echo ""
-    echo "ERROR: Please set GLOBUS_LOCATION to the Globus installation directory before"
-    echo "running this script"
-    echo ""
+if test -f ${GLOBUS_LOCATION:-/usr}/share/globus/globus-script-initializer; then
+    . ${GLOBUS_LOCATION:-/usr}/share/globus/globus-script-initializer
+elif test -f ${GLOBUS_LOCATION:-/usr}/libexec/globus-script-initializer; then
+    . ${GLOBUS_LOCATION:-/usr}/libexec/globus-script-initializer
+else
+    echo "ERROR: Please set GLOBUS_LOCATION to the Globus installation directory before" 1>&2
+    echo "running this script" 1>&2
     exit 1
 fi
-
-. ${GLOBUS_LOCATION}/libexec/globus-script-initializer
-globus_source ${GLOBUS_LOCATION}/libexec/globus-sh-tools.sh
+globus_source ${libexecdir}/globus-sh-tools.sh
 
 PROGRAM_NAME=`echo $0 |${GLOBUS_SH_SED-sed} 's|.*/||g'`