Browse code

make sure user isn't running as root

Jesse Andrews authored on 2011/09/29 06:08:26
Showing 1 changed files
... ...
@@ -37,6 +37,15 @@ if [ ! -d $FILES ]; then
37 37
     exit 1
38 38
 fi
39 39
 
40
+# you need to run this as a regular user with sudo priviledges
41
+if [[ $EUID -eq 0 ]]; then
42
+   echo "This script cannot be run as root." 1>&2
43
+   echo "You should run this script as the user you wish openstack to run as" 1>&2
44
+   echo "The user will need to be a sudoer (without password)" 1>&2
45
+   exit 1
46
+fi
47
+
48
+
40 49
 # Settings
41 50
 # ========
42 51