From 839ec629bf634864268b2ec876f5edbdcb237ce0 Mon Sep 17 00:00:00 2001 From: Marc 'risson' Schmitt Date: Tue, 17 Aug 2021 14:29:33 +0200 Subject: [PATCH] tools: use /usr/bin/env bash instead of /bin/bash Signed-off-by: Marc 'risson' Schmitt Change-Id: I374f7427a4318d00ca474367818117e11789ec13 --- tools/cleanup-containers | 2 +- tools/cleanup-host | 2 +- tools/cleanup-images | 2 +- tools/diag | 2 +- tools/init-runonce | 2 +- tools/kolla-ansible | 2 +- tools/loc | 2 +- tools/ovs-dpdkctl.sh | 2 +- tools/pre-commit-hook | 2 +- tools/run-bashate.sh | 2 +- tools/validate-all-yaml.sh | 2 +- tools/validate-docker-execute.sh | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) 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