summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--make-sgpkg.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/make-sgpkg.py b/make-sgpkg.py
index c363eb3..3ad32c0 100644
--- a/make-sgpkg.py
+++ b/make-sgpkg.py
@@ -181,6 +181,10 @@ def main(argv):
verbose = options.verbose
+ if os.getuid() == 0:
+ print >>sys.stderr, "Don't run %s as root." % argv[0]
+ sys.exit(1)
+
if os.path.exists(os.path.expanduser(properties)):
print >>sys.stderr, "%s exists - this can cause problems. Please remove the file first." % properties
sys.exit(1)