Whamcloud - gitweb
Optionally use RUNAS_GID to runas command to set group to setregid() to.
[fs/lustre-release.git] / lustre / tests / sanityN.sh
index 576712b..fcd0ee6 100644 (file)
@@ -31,7 +31,11 @@ if [ $UID -ne 0 ]; then
        RUNAS=""
 else
        RUNAS_ID=${RUNAS_ID:-500}
-       RUNAS=${RUNAS:-"runas -u $RUNAS_ID"}
+        if [ -z "$RUNAS_GID" ]; then
+           RUNAS=${RUNAS:-"runas -u $RUNAS_ID"}
+        else
+           RUNAS=${RUNAS:-"runas -u $RUNAS_ID -g $RUNAS_GID"}
+        fi
 fi
 
 if [ `using_krb5_sec $SECURITY` == 'y' ] ; then