Permalink
Browse files

Added basic root check to install script.

  • Loading branch information...
1 parent 8666d19 commit 8cb5a4f56a4b7908cbe71afabbcf49996cad8c86 @labisso labisso committed Jun 14, 2010
Showing with 11 additions and 0 deletions.
  1. +11 −0 bin/install
View
@@ -3,6 +3,7 @@
PYTHON_EXE="/usr/bin/env python"
FORCE_FRESH_INSTALL="yes"
+ALLOW_ROOT_INSTALL="no"
NIMBUS_SRC_REL="`dirname $0`/.."
NIMBUS_SRC=`cd $NIMBUS_SRC_REL; pwd`
@@ -15,6 +16,16 @@ if [ "X$1" = "X" ]; then
exit 1
fi
+if [ $ALLOW_ROOT_INSTALL = "no" ] && [ $EUID -eq 0 ]; then
+ echo ""
+ echo "It is not recommended to install Nimbus as root."
+ echo "If you insist, edit this script:"
+ echo " $0"
+ echo "and change ALLOW_ROOT_INSTALL to \"yes\""
+ echo ""
+ exit 1
+fi
+
NIMBUS_HOME=$1
if [ -d $NIMBUS_HOME ] && [ "$(ls -A $NIMBUS_HOME)" ]; then

0 comments on commit 8cb5a4f

Please sign in to comment.