Fix cluster-deployer script execution in venv 96/37096/2
authorDaniel Farrell <dfarrell@redhat.com>
Mon, 4 Apr 2016 19:17:26 +0000 (15:17 -0400)
committerJamo Luhrsen <jluhrsen@redhat.com>
Tue, 5 Apr 2016 00:12:07 +0000 (00:12 +0000)
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 <dfarrell@redhat.com>
tools/clustering/cluster-deployer/deploy.py
tools/clustering/cluster-deployer/restart.py [changed mode: 0644->0755]

index 6de9feabe00314038ef27471344d8553de379a93..877d7d946b5d2b494d74aa0917edad9402594de4 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/local/bin/python
+#!/usr/bin/env python
 #
 # This script deploys a cluster
 # -------------------------------------------
old mode 100644 (file)
new mode 100755 (executable)
index d02a76d..c56092a
@@ -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.
 # --------------------------------------------------------------------------------------