From: Daniel Farrell Date: Mon, 4 Apr 2016 19:17:26 +0000 (-0400) Subject: Fix cluster-deployer script execution in venv X-Git-Tag: release/lithium-sr4~60 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=integration%2Ftest.git;a=commitdiff_plain;h=3c37aa091e4d28d96d7987d7ddca127fd957d419 Fix cluster-deployer script execution in venv The hard-coded path to the python executable in deploy.py and restart.py broke when executing them like scripts in virtual environments. ``` $ ./deploy.py zsh: ./deploy.py: bad interpreter: /usr/local/bin/python: no such file or directory ``` Moves to standard `/usr/bin/env python` method. Removes extra comment character from just before restart.py shebang. Marks restart.py as executable, since it's designed to be run like a script. Change-Id: I945e5704327fb8a2c6387a919054560bd23055d1 Signed-off-by: Daniel Farrell --- diff --git a/tools/clustering/cluster-deployer/deploy.py b/tools/clustering/cluster-deployer/deploy.py index 6de9feabe0..877d7d946b 100755 --- a/tools/clustering/cluster-deployer/deploy.py +++ b/tools/clustering/cluster-deployer/deploy.py @@ -1,4 +1,4 @@ -#!/usr/local/bin/python +#!/usr/bin/env python # # This script deploys a cluster # ------------------------------------------- diff --git a/tools/clustering/cluster-deployer/restart.py b/tools/clustering/cluster-deployer/restart.py old mode 100644 new mode 100755 index d02a76df25..c56092ac34 --- a/tools/clustering/cluster-deployer/restart.py +++ b/tools/clustering/cluster-deployer/restart.py @@ -1,4 +1,4 @@ -# #!/usr/local/bin/python +#!/usr/bin/env python # # This script restarts the cluster nodes. It can optionally cleanup the persistent data. # --------------------------------------------------------------------------------------