aboutsummaryrefslogtreecommitdiff
path: root/tools/init-runonce
diff options
context:
space:
mode:
authorRavi Shekhar Jethani <rsjethani@gmail.com>2017-11-18 01:47:45 +0530
committerRavi Shekhar Jethani <rsjethani@gmail.com>2017-11-23 16:35:45 +0530
commit9c66123c3056bab72830c7c20e66274cb6d58d34 (patch)
tree3af50d2ee27e76043a75922ddcf4737092547f82 /tools/init-runonce
parent99c3e2172ad331408192708b14dd65453fb48e6f (diff)
downloadkolla-ansible-9c66123c3056bab72830c7c20e66274cb6d58d34.tar.gz
kolla-ansible-9c66123c3056bab72830c7c20e66274cb6d58d34.zip
Don't change directory while running init-runonce
Currently init-runonce script changes directory to the script's base directory (/usr/...) before doing anything else. This unnecessarily _forces_ a non-root user to use sudo for running this script thereby raising privileges for code which doesn't want it. Also downloading temporary stuff in places like /usr... seems not a good choice. Hence deleting the said code part and letting the deployer work comfortably from any directory. Made documentation changes accordingly. Change-Id: Ib3c7ed97aa5f53c115b6337aaf572b5fdc7a71f3 Closes-Bug: #1732963
Diffstat (limited to 'tools/init-runonce')
-rwxr-xr-xtools/init-runonce3
1 files changed, 0 insertions, 3 deletions
diff --git a/tools/init-runonce b/tools/init-runonce
index 9f3c0ff97..883f5dfee 100755
--- a/tools/init-runonce
+++ b/tools/init-runonce
@@ -29,9 +29,6 @@ for i in curl openstack; do
exit
fi
done
-# Move to top level directory
-REAL_PATH=$(python -c "import os,sys;print os.path.realpath('$0')")
-cd "$(dirname "$REAL_PATH")/.."
# Test for credentials set
if [[ "${OS_USERNAME}" == "" ]]; then