From 3aae5ca6fda8b07ef875ae47c1b620aa3e2cdcd9 Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Thu, 20 Jul 2017 16:26:42 -0600 Subject: scripts: fix bash path in shebangs /bin/bash is a Linuxism. Other operating systems install bash to different paths. Use /usr/bin/env in shebangs to find bash. Signed-off-by: Alan Somers --- qa/qa_scripts/openstack/ceph_install_w_ansible/ceph_install.sh | 2 +- qa/qa_scripts/openstack/ceph_install_w_ansible/execs/cdn_setup.sh | 2 +- qa/qa_scripts/openstack/ceph_install_w_ansible/execs/ceph_ansible.sh | 2 +- .../openstack/ceph_install_w_ansible/execs/edit_ansible_hosts.sh | 2 +- .../openstack/ceph_install_w_ansible/execs/edit_groupvars_osds.sh | 2 +- qa/qa_scripts/openstack/ceph_install_w_ansible/multi_action.sh | 2 +- qa/qa_scripts/openstack/ceph_install_w_ansible/repolocs.sh | 2 +- qa/qa_scripts/openstack/ceph_install_w_ansible/staller.sh | 2 +- qa/qa_scripts/openstack/ceph_install_w_ansible/talknice.sh | 2 +- qa/qa_scripts/openstack/execs/ceph-pool-create.sh | 4 +++- qa/qa_scripts/openstack/execs/ceph_cluster.sh | 4 +++- qa/qa_scripts/openstack/execs/libvirt-secret.sh | 3 ++- qa/qa_scripts/openstack/execs/openstack-preinstall.sh | 4 +++- qa/qa_scripts/openstack/execs/run_openstack.sh | 4 +++- qa/qa_scripts/openstack/execs/start_openstack.sh | 4 +++- 15 files changed, 26 insertions(+), 15 deletions(-) (limited to 'qa/qa_scripts') diff --git a/qa/qa_scripts/openstack/ceph_install_w_ansible/ceph_install.sh b/qa/qa_scripts/openstack/ceph_install_w_ansible/ceph_install.sh index 76a2e8a6422..b4d14f9c2eb 100755 --- a/qa/qa_scripts/openstack/ceph_install_w_ansible/ceph_install.sh +++ b/qa/qa_scripts/openstack/ceph_install_w_ansible/ceph_install.sh @@ -1,4 +1,4 @@ -#! /bin/bash +#! /usr/bin/env bash if [ $# -ne 5 ]; then echo 'Usage: ceph_install.sh ' exit -1 diff --git a/qa/qa_scripts/openstack/ceph_install_w_ansible/execs/cdn_setup.sh b/qa/qa_scripts/openstack/ceph_install_w_ansible/execs/cdn_setup.sh index 5f2d05ac80d..0c87039dbdb 100755 --- a/qa/qa_scripts/openstack/ceph_install_w_ansible/execs/cdn_setup.sh +++ b/qa/qa_scripts/openstack/ceph_install_w_ansible/execs/cdn_setup.sh @@ -1,4 +1,4 @@ -#! /bin/bash +#! /usr/bin/env bash if [ -f ~/secrets ]; then source ~/secrets fi diff --git a/qa/qa_scripts/openstack/ceph_install_w_ansible/execs/ceph_ansible.sh b/qa/qa_scripts/openstack/ceph_install_w_ansible/execs/ceph_ansible.sh index 6a2a2ba5b92..8581de601c3 100755 --- a/qa/qa_scripts/openstack/ceph_install_w_ansible/execs/ceph_ansible.sh +++ b/qa/qa_scripts/openstack/ceph_install_w_ansible/execs/ceph_ansible.sh @@ -1,4 +1,4 @@ -#! /bin/bash +#! /usr/bin/env bash cephnodes=$* monnode=$1 sudo yum -y install ceph-ansible diff --git a/qa/qa_scripts/openstack/ceph_install_w_ansible/execs/edit_ansible_hosts.sh b/qa/qa_scripts/openstack/ceph_install_w_ansible/execs/edit_ansible_hosts.sh index c3d8df6b2bf..7eb0b701121 100755 --- a/qa/qa_scripts/openstack/ceph_install_w_ansible/execs/edit_ansible_hosts.sh +++ b/qa/qa_scripts/openstack/ceph_install_w_ansible/execs/edit_ansible_hosts.sh @@ -1,4 +1,4 @@ -#! /bin/bash +#! /usr/bin/env bash ed /etc/ansible/hosts << EOF $ a diff --git a/qa/qa_scripts/openstack/ceph_install_w_ansible/execs/edit_groupvars_osds.sh b/qa/qa_scripts/openstack/ceph_install_w_ansible/execs/edit_groupvars_osds.sh index a62ef140072..751658b096f 100755 --- a/qa/qa_scripts/openstack/ceph_install_w_ansible/execs/edit_groupvars_osds.sh +++ b/qa/qa_scripts/openstack/ceph_install_w_ansible/execs/edit_groupvars_osds.sh @@ -1,4 +1,4 @@ -#! /bin/bash +#! /usr/bin/env bash ed /usr/share/ceph-ansible/group_vars/osds << EOF $ /^devices: diff --git a/qa/qa_scripts/openstack/ceph_install_w_ansible/multi_action.sh b/qa/qa_scripts/openstack/ceph_install_w_ansible/multi_action.sh index 9fc2dde2604..abc368b0a12 100755 --- a/qa/qa_scripts/openstack/ceph_install_w_ansible/multi_action.sh +++ b/qa/qa_scripts/openstack/ceph_install_w_ansible/multi_action.sh @@ -1,4 +1,4 @@ -#! /bin/bash +#! /usr/bin/env bash source copy_func.sh allparms=$* cmdv=$1 diff --git a/qa/qa_scripts/openstack/ceph_install_w_ansible/repolocs.sh b/qa/qa_scripts/openstack/ceph_install_w_ansible/repolocs.sh index e4b74af18ad..5d82f35d9f5 100755 --- a/qa/qa_scripts/openstack/ceph_install_w_ansible/repolocs.sh +++ b/qa/qa_scripts/openstack/ceph_install_w_ansible/repolocs.sh @@ -1,4 +1,4 @@ -#! /bin/bash +#! /usr/bin/env bash SPECIFIC_VERSION=latest-Ceph-2-RHEL-7 #SPECIFIC_VERSION=Ceph-2-RHEL-7-20160630.t.0 #SPECIFIC_VERSION=Ceph-2.0-RHEL-7-20160718.t.0 diff --git a/qa/qa_scripts/openstack/ceph_install_w_ansible/staller.sh b/qa/qa_scripts/openstack/ceph_install_w_ansible/staller.sh index 2e560024cb8..99c00da33e1 100755 --- a/qa/qa_scripts/openstack/ceph_install_w_ansible/staller.sh +++ b/qa/qa_scripts/openstack/ceph_install_w_ansible/staller.sh @@ -1,4 +1,4 @@ -#! /bin/bash +#! /usr/bin/env bash cmd_wait=$1 shift sites=$* diff --git a/qa/qa_scripts/openstack/ceph_install_w_ansible/talknice.sh b/qa/qa_scripts/openstack/ceph_install_w_ansible/talknice.sh index 6b538cd6bcf..ffed4f1dcd5 100755 --- a/qa/qa_scripts/openstack/ceph_install_w_ansible/talknice.sh +++ b/qa/qa_scripts/openstack/ceph_install_w_ansible/talknice.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash declare -A rsapub for fulln in $*; do sname=`echo $fulln | sed 's/\..*//'` diff --git a/qa/qa_scripts/openstack/execs/ceph-pool-create.sh b/qa/qa_scripts/openstack/execs/ceph-pool-create.sh index 0bd50b7977b..723c8306916 100755 --- a/qa/qa_scripts/openstack/execs/ceph-pool-create.sh +++ b/qa/qa_scripts/openstack/execs/ceph-pool-create.sh @@ -1,4 +1,6 @@ -#!/bin/bash -f +#!/usr/bin/env bash +set -f + # # On the ceph site, make the pools required for Openstack # diff --git a/qa/qa_scripts/openstack/execs/ceph_cluster.sh b/qa/qa_scripts/openstack/execs/ceph_cluster.sh index 86cb15ee379..5afb3c7879b 100755 --- a/qa/qa_scripts/openstack/execs/ceph_cluster.sh +++ b/qa/qa_scripts/openstack/execs/ceph_cluster.sh @@ -1,4 +1,6 @@ -#! /bin/bash -f +#!/usr/bin/env bash +set -f + echo $OS_CEPH_ISO if [[ $# -ne 4 ]]; then echo "Usage: ceph_cluster mon.0 osd.0 osd.1 osd.2" diff --git a/qa/qa_scripts/openstack/execs/libvirt-secret.sh b/qa/qa_scripts/openstack/execs/libvirt-secret.sh index 63ef679be47..75e9e91a0c7 100755 --- a/qa/qa_scripts/openstack/execs/libvirt-secret.sh +++ b/qa/qa_scripts/openstack/execs/libvirt-secret.sh @@ -1,4 +1,5 @@ -#!/bin/bash -f +#!/usr/bin/env bash +set -f # # Generate a libvirt secret on the Openstack node. diff --git a/qa/qa_scripts/openstack/execs/openstack-preinstall.sh b/qa/qa_scripts/openstack/execs/openstack-preinstall.sh index 1439c08e31e..a2b235e76f3 100755 --- a/qa/qa_scripts/openstack/execs/openstack-preinstall.sh +++ b/qa/qa_scripts/openstack/execs/openstack-preinstall.sh @@ -1,4 +1,6 @@ -#!/bin/bash -f +#!/usr/bin/env bash +set -f + # # Remotely setup the stuff needed to run packstack. This should do items 1-4 in # https://docs.google.com/document/d/1us18KR3LuLyINgGk2rmI-SVj9UksCE7y4C2D_68Aa8o/edit?ts=56a78fcb diff --git a/qa/qa_scripts/openstack/execs/run_openstack.sh b/qa/qa_scripts/openstack/execs/run_openstack.sh index 92465c4afd2..8764cbeb61d 100755 --- a/qa/qa_scripts/openstack/execs/run_openstack.sh +++ b/qa/qa_scripts/openstack/execs/run_openstack.sh @@ -1,4 +1,6 @@ -#!/bin/bash -fv +#!/usr/bin/env bash +set -fv + # # Create a glance image, a corresponding cinder volume, a nova instance, attach, the cinder volume to the # nova instance, and create a backup. diff --git a/qa/qa_scripts/openstack/execs/start_openstack.sh b/qa/qa_scripts/openstack/execs/start_openstack.sh index b81c815d6e7..f5f12fe50c8 100755 --- a/qa/qa_scripts/openstack/execs/start_openstack.sh +++ b/qa/qa_scripts/openstack/execs/start_openstack.sh @@ -1,4 +1,6 @@ -#!/bin/bash -fv +#!/usr/bin/env bash +set -fv + # # start the Openstack services # -- cgit v1.2.3