diff --git a/tools/cleanup-containers b/tools/cleanup-containers index 18988b522d..82683fa575 100755 --- a/tools/cleanup-containers +++ b/tools/cleanup-containers @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash containers_running=$(sudo docker ps --filter "label=kolla_version" --format "{{.Names}}") diff --git a/tools/cleanup-host b/tools/cleanup-host index e9c716eb89..daaf5f8dde 100755 --- a/tools/cleanup-host +++ b/tools/cleanup-host @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Spawning the neutron agents containers leaves artifacts on the host. # This script removes these artifacts. diff --git a/tools/cleanup-images b/tools/cleanup-images index 68b01b5399..87b2084aca 100755 --- a/tools/cleanup-images +++ b/tools/cleanup-images @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Move to top level directory REAL_PATH=$(python -c "import os;print os.path.realpath('$0')") diff --git a/tools/diag b/tools/diag index a01d4752fa..5f270dae64 100755 --- a/tools/diag +++ b/tools/diag @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash echo "##### System Identification #####" egrep -w 'PRETTY_NAME|VERSION_ID' /etc/os-release diff --git a/tools/init-runonce b/tools/init-runonce index 0c5d898458..b4b8739917 100755 --- a/tools/init-runonce +++ b/tools/init-runonce @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -o errexit set -o pipefail diff --git a/tools/kolla-ansible b/tools/kolla-ansible index 05e40d313b..a6d222b7ab 100755 --- a/tools/kolla-ansible +++ b/tools/kolla-ansible @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # This script can be used to interact with kolla via ansible. diff --git a/tools/loc b/tools/loc index 60b14e24fd..5abecbc97b 100755 --- a/tools/loc +++ b/tools/loc @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash ANSIBLE=`find ansible -type f -exec cat {} \; | wc -l` DOCKER=`find docker -type f -exec cat {} \; | wc -l` diff --git a/tools/ovs-dpdkctl.sh b/tools/ovs-dpdkctl.sh index c24ab802f0..ea8cd6e897 100755 --- a/tools/ovs-dpdkctl.sh +++ b/tools/ovs-dpdkctl.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash _XTRACE_OVS_DPDK_CTL=$(set +o | grep xtrace) if [[ "${OVS_DPDK_CTL_DEBUG}" == "True" ]]; then diff --git a/tools/pre-commit-hook b/tools/pre-commit-hook index a589f6f3fc..9947161074 100755 --- a/tools/pre-commit-hook +++ b/tools/pre-commit-hook @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash TOPLEVEL=$(git rev-parse --show-toplevel) RES=0 diff --git a/tools/run-bashate.sh b/tools/run-bashate.sh index 2a92e960b5..b8a54b4403 100755 --- a/tools/run-bashate.sh +++ b/tools/run-bashate.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Ignore E006 -- line length greater than 80 char # Error on E005 -- file does not begin with #! or have .sh prefix diff --git a/tools/validate-all-yaml.sh b/tools/validate-all-yaml.sh index 960de9a58a..07652ca091 100755 --- a/tools/validate-all-yaml.sh +++ b/tools/validate-all-yaml.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash REAL_PATH=$(python -c "import os,sys;print os.path.realpath('$0')") cd "$(dirname "$REAL_PATH")/.." diff --git a/tools/validate-docker-execute.sh b/tools/validate-docker-execute.sh index 94a6756cb8..4db81e1e23 100755 --- a/tools/validate-docker-execute.sh +++ b/tools/validate-docker-execute.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # This script can be used to check user privilege to execute # docker commands