From: Sage Weil Date: Mon, 1 Feb 2016 20:48:53 +0000 (-0500) Subject: qa/workunits/objectstore/test_fuse.sh: fix root check X-Git-Tag: v10.0.4~76^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F7468%2Fhead;p=ceph.git qa/workunits/objectstore/test_fuse.sh: fix root check $EUID not defined everywhere. Signed-off-by: Sage Weil --- diff --git a/qa/workunits/objectstore/test_fuse.sh b/qa/workunits/objectstore/test_fuse.sh index 8f80f0c53c56..07c3ea989497 100755 --- a/qa/workunits/objectstore/test_fuse.sh +++ b/qa/workunits/objectstore/test_fuse.sh @@ -1,6 +1,6 @@ #!/bin/sh -ex -if [ $EUID -ne 0 ]; then +if ! id -u | grep -q '^0$'; then echo "not root, re-running self via sudo" sudo PATH=$PATH $0 || echo FAIL exit 0