From 7f9c89d52892058070c4b7212d263e3ca8dde8de Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Fri, 9 Sep 2011 22:54:29 +0200 Subject: [PATCH] makedist: don't start if not root user --- makedist/makedist | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/makedist/makedist b/makedist/makedist index 451a345..497c184 100755 --- a/makedist/makedist +++ b/makedist/makedist @@ -23,6 +23,11 @@ MAKEDIST_DEFS=$MAKEDIST_DIR/defs.inc.sh exit 1 } +[ "`id -u`" = "0" ] || { + echo "Error: you must be root to run makedist; aborting." + exit 1 +} + opts=($@) while test -n "$1" ; do