From 8013deb66d0003a35865dc817a1eeb602963e80a Mon Sep 17 00:00:00 2001 From: mjmac Date: Wed, 17 Aug 2005 21:13:34 +0000 Subject: [PATCH] Guard against incorrect $RUNAS_ID shenanigans. --- lustre/tests/sanity.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index 52dac6d..e1a996a 100644 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -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} -- 1.8.3.1