Skip to content

Commit

Permalink
scripts: Use shebang /usr/bin/env bash
Browse files Browse the repository at this point in the history
Not all distros have `/bin/bash`, e.g. NixOS.

Fixes: kata-containers#3450

Signed-off-by: Sebastian Hasler <[email protected]>
  • Loading branch information
haslersn committed Jan 13, 2022
1 parent 0917add commit adffd3f
Show file tree
Hide file tree
Showing 52 changed files with 53 additions and 53 deletions.
2 changes: 1 addition & 1 deletion ci/go-test.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Copyright (c) 2020 Intel Corporation
#
Expand Down
2 changes: 1 addition & 1 deletion ci/install_go.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Copyright (c) 2019 Intel Corporation
#
Expand Down
2 changes: 1 addition & 1 deletion ci/install_libseccomp.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Copyright 2021 Sony Group Corporation
#
Expand Down
2 changes: 1 addition & 1 deletion ci/install_musl.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Copyright (c) 2020 Ant Group
#
# SPDX-License-Identifier: Apache-2.0
Expand Down
2 changes: 1 addition & 1 deletion ci/install_rust.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Copyright (c) 2019 Ant Financial
#
# SPDX-License-Identifier: Apache-2.0
Expand Down
2 changes: 1 addition & 1 deletion ci/install_vc.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Copyright (c) 2018 Intel Corporation
#
Expand Down
2 changes: 1 addition & 1 deletion ci/run.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Copyright (c) 2019 Ant Financial
#
Expand Down
2 changes: 1 addition & 1 deletion ci/setup.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Copyright (c) 2018 Intel Corporation
#
Expand Down
2 changes: 1 addition & 1 deletion ci/static-checks.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Copyright (c) 2017-2018 Intel Corporation
#
Expand Down
2 changes: 1 addition & 1 deletion docs/how-to/containerd-kata.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ If you use Containerd older than v1.2.4 or a version of Kata older than v1.6.0
shell script with the following:

```bash
#!/bin/bash
#!/usr/bin/env bash
KATA_CONF_FILE=/etc/kata-containers/firecracker.toml containerd-shim-kata-v2 $@
```

Expand Down
2 changes: 1 addition & 1 deletion docs/how-to/how-to-import-kata-logs-with-fluentd.md
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ At the same time, we will add the `--log=/var/log/kata-runtime.log` argument to
own file (rather than into the system journal).

```bash
#!/bin/bash
#!/usr/bin/env bash
/opt/kata/bin/kata-runtime --config "/opt/kata/share/defaults/kata-containers/configuration-qemu.toml" --log-format=json --log=/var/log/kata-runtime.log $@
```

Expand Down
2 changes: 1 addition & 1 deletion docs/how-to/offline_cpu.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Copyright (c) 2019 Intel Corporation
#
# SPDX-License-Identifier: Apache-2.0
Expand Down
4 changes: 2 additions & 2 deletions docs/use-cases/using-Intel-QAT-and-kata.md
Original file line number Diff line number Diff line change
Expand Up @@ -355,10 +355,10 @@ this small script so that it redirects to be able to use either QEMU or
Cloud Hypervisor with Kata.

```bash
$ echo '#!/bin/bash' | sudo tee /usr/local/bin/containerd-shim-kata-qemu-v2
$ echo '#!/usr/bin/env bash' | sudo tee /usr/local/bin/containerd-shim-kata-qemu-v2
$ echo 'KATA_CONF_FILE=/opt/kata/share/defaults/kata-containers/configuration-qemu.toml /opt/kata/bin/containerd-shim-kata-v2 $@' | sudo tee -a /usr/local/bin/containerd-shim-kata-qemu-v2
$ sudo chmod +x /usr/local/bin/containerd-shim-kata-qemu-v2
$ echo '#!/bin/bash' | sudo tee /usr/local/bin/containerd-shim-kata-clh-v2
$ echo '#!/usr/bin/env bash' | sudo tee /usr/local/bin/containerd-shim-kata-clh-v2
$ echo 'KATA_CONF_FILE=/opt/kata/share/defaults/kata-containers/configuration-clh.toml /opt/kata/bin/containerd-shim-kata-v2 $@' | sudo tee -a /usr/local/bin/containerd-shim-kata-clh-v2
$ sudo chmod +x /usr/local/bin/containerd-shim-kata-clh-v2
```
Expand Down
2 changes: 1 addition & 1 deletion src/libs/protocols/hack/update-generated-proto.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# //
# // Copyright (c) 2020 Ant Group
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/data/kata-collect-data.sh.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Copyright (c) 2017-2020 Intel Corporation
#
Expand Down
2 changes: 1 addition & 1 deletion tools/osbuilder/dockerfiles/QAT/run.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Copyright (c) 2021 Intel Corporation
#
Expand Down
2 changes: 1 addition & 1 deletion tools/osbuilder/dracut/add_libs.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Copyright (c) 2021 IBM Corp.
#
Expand Down
2 changes: 1 addition & 1 deletion tools/osbuilder/initrd-builder/initrd_builder.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Copyright (c) 2018 HyperHQ Inc.
#
Expand Down
2 changes: 1 addition & 1 deletion tools/osbuilder/rootfs-builder/alpine/rootfs_lib.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Copyright (c) 2018 HyperHQ Inc.
#
Expand Down
2 changes: 1 addition & 1 deletion tools/osbuilder/rootfs-builder/rootfs.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Copyright (c) 2018 Intel Corporation
#
Expand Down
2 changes: 1 addition & 1 deletion tools/osbuilder/scripts/lib.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Copyright (c) 2018-2020 Intel Corporation
#
Expand Down
2 changes: 1 addition & 1 deletion tools/packaging/artifact-list.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Copyright (c) 2019 Intel Corporation
#
Expand Down
2 changes: 1 addition & 1 deletion tools/packaging/guest-image/build_image.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Copyright (c) 2018 Intel Corporation
#
Expand Down
2 changes: 1 addition & 1 deletion tools/packaging/kata-deploy/action/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Copyright (c) 2018 Intel Corporation
#
Expand Down
2 changes: 1 addition & 1 deletion tools/packaging/kata-deploy/action/setup-aks.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Copyright (c) 2019 Intel Corporation
#
Expand Down
2 changes: 1 addition & 1 deletion tools/packaging/kata-deploy/action/test-kata.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Copyright (c) 2019 Intel Corporation
#
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Copyright (c) 2018-2021 Intel Corporation
#
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Copyright (c) 2018-2021 Intel Corporation
#
# SPDX-License-Identifier: Apache-2.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Copyright (c) 2021 Intel Corporation
#
# SPDX-License-Identifier: Apache-2.0
Expand Down
2 changes: 1 addition & 1 deletion tools/packaging/kata-deploy/scripts/kata-deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ function configure_different_shims_base() {
fi

cat << EOT | tee "$shim_file"
#!/bin/bash
#!/usr/bin/env bash
KATA_CONF_FILE=/opt/kata/share/defaults/kata-containers/configuration-${shim}.toml /opt/kata/bin/containerd-shim-kata-v2 "\$@"
EOT
chmod +x "$shim_file"
Expand Down
2 changes: 1 addition & 1 deletion tools/packaging/kernel/build-kernel.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Copyright (c) 2018 Intel Corporation
#
Expand Down
2 changes: 1 addition & 1 deletion tools/packaging/release/publish-kata-image.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#Copyright (c) 2018 Intel Corporation
#
#SPDX-License-Identifier: Apache-2.0
Expand Down
2 changes: 1 addition & 1 deletion tools/packaging/release/release-notes.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Copyright (c) 2018 Intel Corporation
#
# SPDX-License-Identifier: Apache-2.0
Expand Down
2 changes: 1 addition & 1 deletion tools/packaging/release/tag_repos.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Copyright (c) 2018 Intel Corporation
#
Expand Down
2 changes: 1 addition & 1 deletion tools/packaging/release/tag_repos_test.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Copyright (c) 2018 Intel Corporation
#
Expand Down
2 changes: 1 addition & 1 deletion tools/packaging/release/update-repository-version.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Copyright (c) 2018 Intel Corporation
#
Expand Down
2 changes: 1 addition & 1 deletion tools/packaging/release/update-repository-version_test.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
#Copyright (c) 2018 Intel Corporation
#
Expand Down
2 changes: 1 addition & 1 deletion tools/packaging/scripts/apply_patches.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Copyright (c) 2020 Red Hat, Inc.
#
Expand Down
2 changes: 1 addition & 1 deletion tools/packaging/scripts/configure-hypervisor.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Copyright (c) 2018 Intel Corporation
#
Expand Down
2 changes: 1 addition & 1 deletion tools/packaging/scripts/gen_versions_txt.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Copyright (c) 2018 Intel Corporation
#
# SPDX-License-Identifier: Apache-2.0
Expand Down
2 changes: 1 addition & 1 deletion tools/packaging/scripts/patch_qemu.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Copyright (c) 2021 Intel Corporation
#
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Copyright (c) 2019 Intel Corporation
#
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Copyright (c) 2018 Intel Corporation
#
Expand Down
2 changes: 1 addition & 1 deletion tools/packaging/static-build/kernel/build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Copyright (c) 2021 Intel Corporation
#
Expand Down
2 changes: 1 addition & 1 deletion tools/packaging/static-build/qemu/build-base-qemu.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Copyright (c) 2018 Intel Corporation
#
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Copyright (c) 2018 Intel Corporation
#
Expand Down
2 changes: 1 addition & 1 deletion tools/packaging/static-build/qemu/build-static-qemu.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Copyright (c) 2018 Intel Corporation
#
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Copyright (c) 2019 Intel Corporation
#
# SPDX-License-Identifier: Apache-2.0
Expand Down
2 changes: 1 addition & 1 deletion tools/packaging/static-build/scripts/qemu-build-post.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Copyright (c) 2020 Red Hat, Inc.
#
Expand Down
2 changes: 1 addition & 1 deletion tools/packaging/static-build/shim-v2/build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Copyright (c) 2021 Intel Corporation
#
Expand Down
2 changes: 1 addition & 1 deletion tools/packaging/static-build/shim-v2/install_go.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Copyright (c) 2018 Intel Corporation
#
Expand Down
2 changes: 1 addition & 1 deletion utils/kata-manager.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Copyright (c) 2020 Intel Corporation
#
Expand Down

0 comments on commit adffd3f

Please sign in to comment.