From d1f410d08a5369c1a25bbd15da318b247003514a Mon Sep 17 00:00:00 2001 From: Christian Berendt Date: Wed, 12 Aug 2015 09:54:58 +0200 Subject: [PATCH] Implement /usr/bin/env as the shebang in all bash scripts In order to be more consistent, and also account for different environments and platforms, this patch implements the use of #!/usr/bin/env as the shebang for all bash scripts in the environment. Closes-Bug: #1485557 Change-Id: I93e6a47fd6be816620682eddb2880e38f11bf675 --- playbooks/roles/galera_server/files/mysql_init.sh | 2 +- playbooks/roles/lxc_container_create/templates/autodev.j2 | 2 +- .../roles/os_heat/files/templates/AWS_RDS_DBInstance.yaml | 4 ++-- scripts/federated-login.sh | 2 +- scripts/run-playbooks.sh | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/playbooks/roles/galera_server/files/mysql_init.sh b/playbooks/roles/galera_server/files/mysql_init.sh index 1bdf118fa7..b2cd26addf 100644 --- a/playbooks/roles/galera_server/files/mysql_init.sh +++ b/playbooks/roles/galera_server/files/mysql_init.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # ### BEGIN INIT INFO # Provides: mysql diff --git a/playbooks/roles/lxc_container_create/templates/autodev.j2 b/playbooks/roles/lxc_container_create/templates/autodev.j2 index 259f15e7f5..6078bc64d0 100644 --- a/playbooks/roles/lxc_container_create/templates/autodev.j2 +++ b/playbooks/roles/lxc_container_create/templates/autodev.j2 @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash cd ${LXC_ROOTFS_MOUNT}/dev mkdir net mknod net/tun c 10 200 diff --git a/playbooks/roles/os_heat/files/templates/AWS_RDS_DBInstance.yaml b/playbooks/roles/os_heat/files/templates/AWS_RDS_DBInstance.yaml index 30173442e6..b7c53bdd69 100644 --- a/playbooks/roles/os_heat/files/templates/AWS_RDS_DBInstance.yaml +++ b/playbooks/roles/os_heat/files/templates/AWS_RDS_DBInstance.yaml @@ -95,8 +95,8 @@ Resources: MasterUserPassword: {Ref: MasterUserPassword} WaitHandle: {Ref: WaitHandle} - | - #!/bin/bash -v - # + #!/usr/bin/env bash + set -v iptables -F # Helper function diff --git a/scripts/federated-login.sh b/scripts/federated-login.sh index c6a199df61..d524c9f20e 100755 --- a/scripts/federated-login.sh +++ b/scripts/federated-login.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright 2015, Rackspace US, Inc. # diff --git a/scripts/run-playbooks.sh b/scripts/run-playbooks.sh index 4dd42d7f8a..f16e8d1503 100755 --- a/scripts/run-playbooks.sh +++ b/scripts/run-playbooks.sh @@ -37,7 +37,7 @@ info_block "Checking for required libraries." 2> /dev/null || source $(dirname $ ## Main ---------------------------------------------------------------------- # Create a simple task to bounce all networks within a container. cat > /tmp/ensure_container_networking.sh <