add Shebang for bash scripts 43/5343/2
authorcarey.xu <carey.xuhan@huawei.com>
Tue, 29 Dec 2015 08:40:02 +0000 (16:40 +0800)
committercarey.xu <carey.xuhan@huawei.com>
Wed, 30 Dec 2015 00:29:20 +0000 (08:29 +0800)
 * Our bash scripts use some bash sepcific syntax, so
   them can not be started by other shell like zsh.
   Add shebang for them, so zsh can simplely execute
   './deploy.sh'

Change-Id: Ic6e6afaa83c6de131e6ac4eda1601d11c5b22656
Signed-off-by: carey.xu <carey.xuhan@huawei.com>
12 files changed:
deploy.sh
deploy/compass_vm.sh [changed mode: 0644->0755]
deploy/deploy_host.sh [changed mode: 0644->0755]
deploy/deploy_parameter.sh
deploy/host_baremetal.sh [changed mode: 0644->0755]
deploy/host_virtual.sh [changed mode: 0644->0755]
deploy/launch.sh
deploy/network.sh
deploy/prepare.sh
deploy_compass.sh
deploy_host.sh
redeploy_host.sh

index 653eec8..5b315c5 100755 (executable)
--- a/deploy.sh
+++ b/deploy.sh
@@ -1,3 +1,4 @@
+#!/bin/bash
 #set -x
 COMPASS_DIR=`cd ${BASH_SOURCE[0]%/*}/;pwd`
 export COMPASS_DIR
old mode 100644 (file)
new mode 100755 (executable)
index 5b94b60..196df4a
@@ -1,3 +1,4 @@
+#!/bin/bash
 compass_vm_dir=$WORK_DIR/vm/compass
 rsa_file=$compass_vm_dir/boot.rsa
 ssh_args="-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i $rsa_file"
old mode 100644 (file)
new mode 100755 (executable)
index be392d7..b87a74d
@@ -1,3 +1,4 @@
+#!/bin/bash
 function deploy_host(){
 
     ssh $ssh_args root@${MGMT_IP} mkdir -p /opt/compass/bin/ansible_callbacks
index 8b2e769..dfecbe3 100755 (executable)
@@ -1,3 +1,4 @@
+#!/bin/bash
 set -x
 function get_option_name_list()
 {
old mode 100644 (file)
new mode 100755 (executable)
index 0210cee..2281ffb
@@ -1,3 +1,4 @@
+#!/bin/bash
 function reboot_hosts() {
     if [ -z $POWER_MANAGE ]; then
         return
old mode 100644 (file)
new mode 100755 (executable)
index c7e5f84..8e93b9b
@@ -1,3 +1,4 @@
+#!/bin/bash
 host_vm_dir=$WORK_DIR/vm
 function tear_down_machines() {
     old_ifs=$IFS
index 7160612..b9e4769 100755 (executable)
@@ -1,3 +1,4 @@
+#!/bin/bash
 #set -x
 WORK_DIR=$COMPASS_DIR/work/deploy
 
index c6d0df5..9f1a7b9 100755 (executable)
@@ -1,4 +1,4 @@
-
+#!/bin/bash
 function clear_forward_rejct_rules()
 {
     while sudo iptables -nL FORWARD --line-number|grep -E 'REJECT +all +-- +0.0.0.0/0 +0.0.0.0/0 +reject-with icmp-port-unreachable'|head -1|awk '{print $1}'|xargs sudo iptables -D FORWARD; do :; done
index f1aacd9..ee27db1 100755 (executable)
@@ -1,4 +1,4 @@
-
+#!/bin/bash
 function print_logo()
 {
     if ! apt --installed list 2>/dev/null | grep "figlet"
index a92ecea..7d20d03 100755 (executable)
@@ -1,3 +1,4 @@
+#!/bin/bash
 export DEPLOY_COMPASS=${DEPLOY_COMPASS-"true"}
 
 ./deploy.sh $*
index 1272aee..f5b6e78 100755 (executable)
@@ -1,3 +1,4 @@
+#!/bin/bash
 export DEPLOY_HOST=${DEPLOY_HOST-"true"}
 
 ./deploy.sh $*
index 9ae02fc..8a86ff1 100755 (executable)
@@ -1,3 +1,4 @@
+#!/bin/bash
 export REDEPLOY_HOST=${REDEPLOY_HOST-"true"}
 
 ./deploy.sh $*