From: Sage Weil Date: Fri, 11 Feb 2011 18:22:54 +0000 (-0800) Subject: check if we are root X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ae089551cf7e1302e7ee367e6b946877eaead7b8;p=ceph-build.git check if we are root --- diff --git a/build_dsc.sh b/build_dsc.sh index b84740d39..a7e1c141c 100755 --- a/build_dsc.sh +++ b/build_dsc.sh @@ -15,6 +15,9 @@ dists="$*" [ -z "$debsubver" ] && debsubver=1 [ -z "$dists" ] && dists="sid squeeze lenny maverick lucid" +whoami=`whoami` +[ "$whoami" != "root" ] && echo "must run as root not $whoami" && exit 1 + bindir=`dirname $0` echo "$bindir" | grep -v -q '^/' && bindir=`pwd`"/$bindir"