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 6de9fea..877d7d9 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.
 # --------------------------------------------------------------------------------------

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.