[COMMON] Fix shell scripts missing shebangs 79/118979/15
authorGuillaume Lambert <guillaume.lambert@orange.com>
Tue, 9 Mar 2021 15:56:08 +0000 (16:56 +0100)
committerKrzysztof Opasiak <k.opasiak@samsung.com>
Tue, 13 Apr 2021 10:04:10 +0000 (10:04 +0000)
pointed out by checkbashisms.

$ tox -e checkbashisms |grep 'interpreter line' | cut -d' ' -f2
  |xargs grep -lv '#!/bin/sh' | xargs sed -i -e '1i#!/bin/sh' -e '1i\\'

plus manual fixes

Issue-ID: OOM-2643
Signed-off-by: Guillaume Lambert <guillaume.lambert@orange.com>
Change-Id: Ic41fec6ebadd162cecf889f2b119ac82551bd21d

31 files changed:
kubernetes/appc/resources/config/appc/opt/onap/appc/bin/installAppcDb.sh
kubernetes/appc/resources/config/appc/opt/onap/appc/svclogic/bin/showActiveGraphs.sh
kubernetes/appc/resources/config/appc/opt/onap/ccsdk/svclogic/bin/showActiveGraphs.sh
kubernetes/common/certInitializer/resources/retrieval_check.sh
kubernetes/consul/resources/config/consul-agent-config/scripts/aai-search-storage-write-script.sh
kubernetes/consul/resources/config/consul-agent-config/scripts/appc-dbhost-script.sh
kubernetes/consul/resources/config/consul-agent-config/scripts/clamp-mariadb-script.sh
kubernetes/consul/resources/config/consul-agent-config/scripts/data-router-script.sh
kubernetes/consul/resources/config/consul-agent-config/scripts/model-loader-script.sh
kubernetes/consul/resources/config/consul-agent-config/scripts/mr-kafka-health.sh
kubernetes/consul/resources/config/consul-agent-config/scripts/mr-zookeeper-health.sh
kubernetes/consul/resources/config/consul-agent-config/scripts/policy-mariadb-script.sh
kubernetes/consul/resources/config/consul-agent-config/scripts/sdc-be-script.sh
kubernetes/consul/resources/config/consul-agent-config/scripts/sdc-cs-script.sh
kubernetes/consul/resources/config/consul-agent-config/scripts/sdc-fe-script.sh
kubernetes/consul/resources/config/consul-agent-config/scripts/sdc-titan-script.sh
kubernetes/consul/resources/config/consul-agent-config/scripts/sdnc-dbhost-script.sh
kubernetes/consul/resources/config/consul-agent-config/scripts/so-api-script.sh
kubernetes/consul/resources/config/consul-agent-config/scripts/so-camunda-script.sh
kubernetes/consul/resources/config/consul-agent-config/scripts/so-jra-script.sh
kubernetes/consul/resources/config/consul-agent-config/scripts/so-mariadb-script.sh
kubernetes/consul/resources/config/consul-agent-config/scripts/sparky-be-script.sh
kubernetes/consul/resources/config/consul-agent-config/scripts/vid-mariadb-script.sh
kubernetes/contrib/components/awx/resources/config/environment.sh
kubernetes/oof/components/oof-has/resources/config/healthy.sh
kubernetes/portal/docker/init/mariadb-client/db_migrate.sh
kubernetes/robot/ete-k8s.sh
kubernetes/robot/eteHelm-k8s.sh
kubernetes/robot/scripts/etescript/hvves-etescript.sh
kubernetes/robot/scripts/etescript/vnfsdk-etescript.sh
kubernetes/sdnc/components/sdnc-prom/resources/bin/switchVoting.sh

index f3af14b..25e4769 100644 (file)
@@ -1,3 +1,5 @@
+#!/bin/sh
+
 {{/*
 # Copyright © 2021 Orange
 #
@@ -13,8 +15,6 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 */}}
-#!/bin/sh
-
 echo "*** retrieving passwords for certificates"
 export $(/opt/app/aaf_config/bin/agent.sh local showpass \
   {{.Values.fqi}} {{ .Values.fqdn }} | grep '^c' | xargs -0)
index 9f5309b..21296ff 100755 (executable)
@@ -1,3 +1,5 @@
+#!/bin/bash
+
 {{/*
 # Copyright © 2017 Amdocs, Bell Canada
 # Modifications Copyright © 2018 AT&T,VMware
@@ -13,9 +15,8 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-
 */}}
-#!/bin/bash
+
 {{/*
 # Controller is a process that reads from Music Q
 # It uses no ports (TCP or HTTP). The PROB will check
index 8e9ccb4..6f62a0e 100644 (file)
@@ -1,3 +1,5 @@
+#!/bin/sh -x
+
 # Copyright © 2018 Amdocs, Bell Canada, AT&T
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
@@ -12,7 +14,6 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-#!/bin/sh -x
 SQL_DEST_DIR=${SQL_DEST_DIR:-/tmp/sql}
 DB_PORT=${DB_PORT:-3306}
 
index e3d05df..576b669 100755 (executable)
@@ -1,3 +1,5 @@
+#!/bin/bash
+
 # Copyright © 2018 Amdocs, Bell Canada
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
@@ -12,8 +14,6 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-#!/bin/bash
-
 #
 # Run the testsuite for the passed tag. Valid tags are listed in usage help
 # Please clean up logs when you are done...
index 9f8cbb2..b8b8708 100755 (executable)
@@ -1,3 +1,5 @@
+#!/bin/bash
+
 # Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
@@ -12,8 +14,6 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-#!/bin/bash
-
 #
 # Run the health-check testsuites for the tags discovered by helm list
 # Please clean up logs when you are done...
index 5d22c4b..b47051f 100755 (executable)
@@ -1,3 +1,5 @@
+#!/bin/bash
+
 # Copyright © 2019 Nokia
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
@@ -12,8 +14,6 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-#!/bin/bash
-
 #
 # Generate HV-VES SSL related certs.
 # Copy the stuff to HV-VES and Robot pods.
index f1d3969..19864d4 100755 (executable)
@@ -1,7 +1,7 @@
-# SPDX-License-Identifier: Apache-2.0
-
 #!/bin/bash
 
+# SPDX-License-Identifier: Apache-2.0
+
 #
 # Create root certificate CA (Certificate Authority) and its private key.
 # Create the package certificate issued by CA
index 091643f..8057547 100755 (executable)
@@ -1,6 +1,6 @@
-{{/*
-#/bin/sh
+#!/bin/sh
 
+{{/*
 # Copyright © 2018 Amdocs
 #
 # Licensed under the Apache License, Version 2.0 (the "License");