Whamcloud - gitweb
Guard against incorrect $RUNAS_ID shenanigans.
authormjmac <mjmac>
Wed, 17 Aug 2005 21:13:34 +0000 (21:13 +0000)
committermjmac <mjmac>
Wed, 17 Aug 2005 21:13:34 +0000 (21:13 +0000)
lustre/tests/sanity.sh

index 52dac6d..e1a996a 100644 (file)
@@ -53,6 +53,12 @@ if [ $UID -ne 0 ]; then
 else
        RUNAS_ID=${RUNAS_ID:-500}
        RUNAS=${RUNAS:-"runas -u $RUNAS_ID"}
+
+    # $RUNAS_ID may get set incorrectly somewhere else
+    if [ $RUNAS_ID -eq 0 ]; then
+       echo "Error: \$RUNAS_ID set to 0, but \$UID is also 0!"
+       exit 1
+    fi
 fi
 
 export NAME=${NAME:-local}