From 1a6870c1f6f84c972820ddc2028d706c90647452 Mon Sep 17 00:00:00 2001 From: hackacad Date: Wed, 4 Aug 2021 20:24:50 +0200 Subject: [PATCH] alt bash path support Signed-off-by: hackacad --- buildSrc/src/main/resources/deb/postinst.ftl | 2 +- buildSrc/src/main/resources/deb/preinst.ftl | 2 +- client/sniffer/src/test/resources/create_test_nodes_info.bash | 2 +- distribution/docker/docker-test-entrypoint.sh | 2 +- distribution/docker/src/docker/bin/docker-entrypoint.sh | 2 +- distribution/packages/src/common/scripts/preinst | 2 +- distribution/packages/src/deb/init.d/opensearch | 2 +- distribution/packages/src/rpm/init.d/opensearch | 2 +- libs/ssl-config/src/test/resources/certs/README.txt | 2 +- plugins/examples/custom-settings/src/main/bin/test | 2 +- qa/remote-clusters/docker-test-entrypoint.sh | 2 +- .../krb5kdc-fixture/src/main/resources/provision/addprinc.sh | 2 +- .../krb5kdc-fixture/src/main/resources/provision/hdfs.sh | 2 +- .../krb5kdc-fixture/src/main/resources/provision/installkdc.sh | 2 +- .../krb5kdc-fixture/src/main/resources/provision/peppa.sh | 2 +- 15 files changed, 15 insertions(+), 15 deletions(-) diff --git a/buildSrc/src/main/resources/deb/postinst.ftl b/buildSrc/src/main/resources/deb/postinst.ftl index 9acfc0f084e06..605f620e16444 100644 --- a/buildSrc/src/main/resources/deb/postinst.ftl +++ b/buildSrc/src/main/resources/deb/postinst.ftl @@ -1,2 +1,2 @@ -#!/bin/bash -e +#!/usr/bin/env bash -e <% commands.each {command -> %><%= command %><% } %> diff --git a/buildSrc/src/main/resources/deb/preinst.ftl b/buildSrc/src/main/resources/deb/preinst.ftl index 9acfc0f084e06..605f620e16444 100644 --- a/buildSrc/src/main/resources/deb/preinst.ftl +++ b/buildSrc/src/main/resources/deb/preinst.ftl @@ -1,2 +1,2 @@ -#!/bin/bash -e +#!/usr/bin/env bash -e <% commands.each {command -> %><%= command %><% } %> diff --git a/client/sniffer/src/test/resources/create_test_nodes_info.bash b/client/sniffer/src/test/resources/create_test_nodes_info.bash index 8b5eb6ceecaea..e5925b195057d 100644 --- a/client/sniffer/src/test/resources/create_test_nodes_info.bash +++ b/client/sniffer/src/test/resources/create_test_nodes_info.bash @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Recreates the v_nodes_http.json files in this directory. This is # meant to be an "every once in a while" thing that we do only when diff --git a/distribution/docker/docker-test-entrypoint.sh b/distribution/docker/docker-test-entrypoint.sh index 38e8bac3cb788..85a90df003ab4 100755 --- a/distribution/docker/docker-test-entrypoint.sh +++ b/distribution/docker/docker-test-entrypoint.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash cd /usr/share/opensearch/bin/ /usr/local/bin/docker-entrypoint.sh | tee > /usr/share/opensearch/logs/console.log diff --git a/distribution/docker/src/docker/bin/docker-entrypoint.sh b/distribution/docker/src/docker/bin/docker-entrypoint.sh index f868f6596b417..0d6ca588d875d 100644 --- a/distribution/docker/src/docker/bin/docker-entrypoint.sh +++ b/distribution/docker/src/docker/bin/docker-entrypoint.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e # Files created by Elasticsearch should always be group writable too diff --git a/distribution/packages/src/common/scripts/preinst b/distribution/packages/src/common/scripts/preinst index 5dffc488c09a1..c13f079666467 100644 --- a/distribution/packages/src/common/scripts/preinst +++ b/distribution/packages/src/common/scripts/preinst @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # This script is executed in the pre-installation phase # diff --git a/distribution/packages/src/deb/init.d/opensearch b/distribution/packages/src/deb/init.d/opensearch index 606021bf19fbc..cc95b465c88d6 100755 --- a/distribution/packages/src/deb/init.d/opensearch +++ b/distribution/packages/src/deb/init.d/opensearch @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # /etc/init.d/opensearch -- startup script for OpenSearch # diff --git a/distribution/packages/src/rpm/init.d/opensearch b/distribution/packages/src/rpm/init.d/opensearch index 78db51795340e..d31fca9d2d1a7 100644 --- a/distribution/packages/src/rpm/init.d/opensearch +++ b/distribution/packages/src/rpm/init.d/opensearch @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # opensearch # diff --git a/libs/ssl-config/src/test/resources/certs/README.txt b/libs/ssl-config/src/test/resources/certs/README.txt index 882df228c520e..09910e99a132e 100644 --- a/libs/ssl-config/src/test/resources/certs/README.txt +++ b/libs/ssl-config/src/test/resources/certs/README.txt @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # This is README describes how the certificates in this directory were created. # This file can also be executed as a script diff --git a/plugins/examples/custom-settings/src/main/bin/test b/plugins/examples/custom-settings/src/main/bin/test index c9aa63a4b67cd..6538a5c557432 100755 --- a/plugins/examples/custom-settings/src/main/bin/test +++ b/plugins/examples/custom-settings/src/main/bin/test @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Plugin can contain executable files that are copied by the plugin manager # to a /bin folder. diff --git a/qa/remote-clusters/docker-test-entrypoint.sh b/qa/remote-clusters/docker-test-entrypoint.sh index 7e173ad615225..e08e388b8c98d 100755 --- a/qa/remote-clusters/docker-test-entrypoint.sh +++ b/qa/remote-clusters/docker-test-entrypoint.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash cd /usr/share/opensearch/bin/ ./opensearch-users useradd rest_user -p test-password -r superuser || true echo "testnode" > /tmp/password diff --git a/test/fixtures/krb5kdc-fixture/src/main/resources/provision/addprinc.sh b/test/fixtures/krb5kdc-fixture/src/main/resources/provision/addprinc.sh index 9fc2a0735d666..a58df6d47f36f 100755 --- a/test/fixtures/krb5kdc-fixture/src/main/resources/provision/addprinc.sh +++ b/test/fixtures/krb5kdc-fixture/src/main/resources/provision/addprinc.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Licensed to Elasticsearch under one or more contributor # license agreements. See the NOTICE file distributed with diff --git a/test/fixtures/krb5kdc-fixture/src/main/resources/provision/hdfs.sh b/test/fixtures/krb5kdc-fixture/src/main/resources/provision/hdfs.sh index 269b4246a9e9d..413c1ee29d0d9 100644 --- a/test/fixtures/krb5kdc-fixture/src/main/resources/provision/hdfs.sh +++ b/test/fixtures/krb5kdc-fixture/src/main/resources/provision/hdfs.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # SPDX-License-Identifier: Apache-2.0 # diff --git a/test/fixtures/krb5kdc-fixture/src/main/resources/provision/installkdc.sh b/test/fixtures/krb5kdc-fixture/src/main/resources/provision/installkdc.sh index 081625d1ea130..aec2d46073c83 100755 --- a/test/fixtures/krb5kdc-fixture/src/main/resources/provision/installkdc.sh +++ b/test/fixtures/krb5kdc-fixture/src/main/resources/provision/installkdc.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # SPDX-License-Identifier: Apache-2.0 # diff --git a/test/fixtures/krb5kdc-fixture/src/main/resources/provision/peppa.sh b/test/fixtures/krb5kdc-fixture/src/main/resources/provision/peppa.sh index a0416e5bab913..f70ad575d6582 100644 --- a/test/fixtures/krb5kdc-fixture/src/main/resources/provision/peppa.sh +++ b/test/fixtures/krb5kdc-fixture/src/main/resources/provision/peppa.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e