aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Peeler <jpeeler@redhat.com>2015-03-21 02:18:01 -0400
committerJeff Peeler <jpeeler@redhat.com>2015-03-21 02:18:01 -0400
commit07f5999276c80f2b30d47a0139607e4b2bab0483 (patch)
treec65d2a8ca8ad19850c95e32d6390f200b043fbcb
parent0d9a53470d8a3deaf89e58a1bfe53636bb23c8a2 (diff)
downloadkolla-07f5999276c80f2b30d47a0139607e4b2bab0483.tar.gz
kolla-07f5999276c80f2b30d47a0139607e4b2bab0483.zip
Check for root privilege in start.sh
This change was lost in 888bb9cc8c68bf61fddc0ca08a69f764a4012121. Both modprobe and setenforce require root, so I think this is a good sanity check. Change-Id: I431df44e0fed4a981df96a9a98bfbb5c350e49ac
-rwxr-xr-xtools/start5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/start b/tools/start
index d9fa3f3f4..b6dcb3a9c 100755
--- a/tools/start
+++ b/tools/start
@@ -6,6 +6,11 @@
# services are up. You will also need these in order to interact with the
# installation once started.
+if [[ $EUID -ne 0 ]]; then
+ echo "You must execute this script as root." 1>&2
+ exit 1
+fi
+
# Move to top level directory
REAL_PATH=$(python -c "import os,sys;print os.path.realpath('$0')")
cd "$(dirname "$REAL_PATH")/.."