summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcarey.xu <carey.xuhan@huawei.com>2015-12-29 16:40:02 +0800
committercarey.xu <carey.xuhan@huawei.com>2015-12-30 08:29:20 +0800
commit884b63029d595e31d0e32c64db4f8394a76526b1 (patch)
tree0c022f6a13ef135128ede9fee2dfd574c54f16a3
parentb8f4e0117d54260c993aba3a1d6a429495dacaf6 (diff)
add Shebang for bash scripts
* 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>
-rwxr-xr-xdeploy.sh1
-rwxr-xr-x[-rw-r--r--]deploy/compass_vm.sh1
-rwxr-xr-x[-rw-r--r--]deploy/deploy_host.sh1
-rwxr-xr-xdeploy/deploy_parameter.sh1
-rwxr-xr-x[-rw-r--r--]deploy/host_baremetal.sh1
-rwxr-xr-x[-rw-r--r--]deploy/host_virtual.sh1
-rwxr-xr-xdeploy/launch.sh1
-rwxr-xr-xdeploy/network.sh2
-rwxr-xr-xdeploy/prepare.sh2
-rwxr-xr-xdeploy_compass.sh1
-rwxr-xr-xdeploy_host.sh1
-rwxr-xr-xredeploy_host.sh1
12 files changed, 12 insertions, 2 deletions
diff --git a/deploy.sh b/deploy.sh
index 653eec85..5b315c5c 100755
--- a/deploy.sh
+++ b/deploy.sh
@@ -1,3 +1,4 @@
+#!/bin/bash
#set -x
COMPASS_DIR=`cd ${BASH_SOURCE[0]%/*}/;pwd`
export COMPASS_DIR
diff --git a/deploy/compass_vm.sh b/deploy/compass_vm.sh
index 5b94b603..196df4a3 100644..100755
--- a/deploy/compass_vm.sh
+++ b/deploy/compass_vm.sh
@@ -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"
diff --git a/deploy/deploy_host.sh b/deploy/deploy_host.sh
index be392d71..b87a74d3 100644..100755
--- a/deploy/deploy_host.sh
+++ b/deploy/deploy_host.sh
@@ -1,3 +1,4 @@
+#!/bin/bash
function deploy_host(){
ssh $ssh_args root@${MGMT_IP} mkdir -p /opt/compass/bin/ansible_callbacks
diff --git a/deploy/deploy_parameter.sh b/deploy/deploy_parameter.sh
index 8b2e7695..dfecbe33 100755
--- a/deploy/deploy_parameter.sh
+++ b/deploy/deploy_parameter.sh
@@ -1,3 +1,4 @@
+#!/bin/bash
set -x
function get_option_name_list()
{
diff --git a/deploy/host_baremetal.sh b/deploy/host_baremetal.sh
index 0210cee8..2281ffbf 100644..100755
--- a/deploy/host_baremetal.sh
+++ b/deploy/host_baremetal.sh
@@ -1,3 +1,4 @@
+#!/bin/bash
function reboot_hosts() {
if [ -z $POWER_MANAGE ]; then
return
diff --git a/deploy/host_virtual.sh b/deploy/host_virtual.sh
index c7e5f84e..8e93b9b3 100644..100755
--- a/deploy/host_virtual.sh
+++ b/deploy/host_virtual.sh
@@ -1,3 +1,4 @@
+#!/bin/bash
host_vm_dir=$WORK_DIR/vm
function tear_down_machines() {
old_ifs=$IFS
diff --git a/deploy/launch.sh b/deploy/launch.sh
index 7160612f..b9e47693 100755
--- a/deploy/launch.sh
+++ b/deploy/launch.sh
@@ -1,3 +1,4 @@
+#!/bin/bash
#set -x
WORK_DIR=$COMPASS_DIR/work/deploy
diff --git a/deploy/network.sh b/deploy/network.sh
index c6d0df5d..9f1a7b90 100755
--- a/deploy/network.sh
+++ b/deploy/network.sh
@@ -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
diff --git a/deploy/prepare.sh b/deploy/prepare.sh
index f1aacd98..ee27db1b 100755
--- a/deploy/prepare.sh
+++ b/deploy/prepare.sh
@@ -1,4 +1,4 @@
-
+#!/bin/bash
function print_logo()
{
if ! apt --installed list 2>/dev/null | grep "figlet"
diff --git a/deploy_compass.sh b/deploy_compass.sh
index a92ecea2..7d20d03a 100755
--- a/deploy_compass.sh
+++ b/deploy_compass.sh
@@ -1,3 +1,4 @@
+#!/bin/bash
export DEPLOY_COMPASS=${DEPLOY_COMPASS-"true"}
./deploy.sh $*
diff --git a/deploy_host.sh b/deploy_host.sh
index 1272aee0..f5b6e786 100755
--- a/deploy_host.sh
+++ b/deploy_host.sh
@@ -1,3 +1,4 @@
+#!/bin/bash
export DEPLOY_HOST=${DEPLOY_HOST-"true"}
./deploy.sh $*
diff --git a/redeploy_host.sh b/redeploy_host.sh
index 9ae02fc7..8a86ff14 100755
--- a/redeploy_host.sh
+++ b/redeploy_host.sh
@@ -1,3 +1,4 @@
+#!/bin/bash
export REDEPLOY_HOST=${REDEPLOY_HOST-"true"}
./deploy.sh $*