mirror of
https://github.com/containers/podman.git
synced 2025-08-06 11:32:07 +08:00
Use bash
binary from env instead of /bin/bash for scripts
It's not possible to run any of the scripts on distributions which do have `bash` not in `/bin`. This is being fixed by using `/usr/bin/env bash` instead. Signed-off-by: Sascha Grunert <sgrunert@suse.com>
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
set -euxo pipefail
|
||||
|
||||
# returned path can vary: /usr/bin/dnf /bin/dnf ...
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# N/B: This script could mega f*!@up your disks if run by mistake.
|
||||
# it is left without the execute-bit on purpose!
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
source $(dirname $0)/lib.sh
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
set -xeo pipefail
|
||||
|
||||
export GOPATH=/var/tmp/go
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
|
@ -376,7 +376,7 @@ install_scl_git() {
|
||||
echo "Installing SoftwareCollections updated 'git' version."
|
||||
ooe.sh $SUDO yum -y install rh-git29
|
||||
cat << "EOF" | $SUDO tee /usr/bin/git
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
scl enable rh-git29 -- git $@
|
||||
EOF
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Unit tests for some functions in lib.sh
|
||||
#
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# This script attempts basic confirmation of functional networking
|
||||
# by connecting to a set of essential external servers and failing
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# This script executes a command while logging all output to a temporary
|
||||
# file. If the command exits non-zero, then all output is sent to the console,
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# N/B: This script is not intended to be run by humans. It is used to configure the
|
||||
# fedora base image for importing, so that it will boot in GCE
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# This script is called from fedora_setup.sh and various Dockerfiles.
|
||||
# It's not intended to be used outside of those contexts. It assumes the lib.sh
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# This script is called by packer on the subject fedora VM, to setup the podman
|
||||
# build/test environment. It's not intended to be used outside of this context.
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# This script is called by packer on a vanilla CentOS VM, to setup the image
|
||||
# used for building images FROM base images. It's not intended to be used
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# This script is utilized by Makefile, it's not intended to be run by humans
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# N/B: This script is not intended to be run by humans. It is used to configure the
|
||||
# fedora base image for importing, so that it will boot in GCE
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set +e # Not all of these exist on every platform
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# This script is called from ubuntu_setup.sh and various Dockerfiles.
|
||||
# It's not intended to be used outside of those contexts. It assumes the lib.sh
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# This script is called by packer on the subject Ubuntu VM, to setup the podman
|
||||
# build/test environment. It's not intended to be used outside of this context.
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# This script is called by packer on the subject fedora VM, to setup the podman
|
||||
# build/test environment. It's not intended to be used outside of this context.
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
source $(dirname $0)/lib.sh
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
source $(dirname $0)/lib.sh
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
#!/bin/bash -e
|
||||
#!/usr/bin/env bash
|
||||
# Assemble remote man pages for darwin or windows from markdown files
|
||||
set -e
|
||||
|
||||
PLATFORM=$1 ## linux, windows or darwin
|
||||
TARGET=${2} ## where to output files
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
if pkg-config libapparmor 2> /dev/null ; then
|
||||
echo apparmor
|
||||
fi
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
cc -E - > /dev/null 2> /dev/null << EOF
|
||||
#include <btrfs/ioctl.h>
|
||||
EOF
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
cc -E - > /dev/null 2> /dev/null << EOF
|
||||
#include <btrfs/version.h>
|
||||
EOF
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
if ! [ $(id -u) = 0 ]; then
|
||||
echo "Please run as root! '$@' requires root privileges."
|
||||
exit 1
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# This script produces various bits of metadata needed by Makefile. Using
|
||||
# a script allows uniform behavior across multiple environments and
|
||||
|
@ -1,6 +1,7 @@
|
||||
#!/bin/bash -e
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Need to run linter twice to cover all the build tags code paths
|
||||
set -e
|
||||
|
||||
declare -A BUILD_TAGS
|
||||
# TODO: add systemd tag
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
|
@ -1,7 +1,8 @@
|
||||
#!/bin/bash -e
|
||||
#!/usr/bin/env bash
|
||||
BASE_PATH="/usr/libexec/podman"
|
||||
CATATONIT_PATH="${BASE_PATH}/catatonit"
|
||||
CATATONIT_VERSION="v0.1.4"
|
||||
set -e
|
||||
|
||||
if [ -f $CATATONIT_PATH ]; then
|
||||
echo "skipping ... catatonit is already installed"
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
tmpdir="$PWD/tmp.$RANDOM"
|
||||
mkdir -p "$tmpdir"
|
||||
trap 'rm -fr "$tmpdir"' EXIT
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# man-page-checker - validate and cross-reference man page names
|
||||
#
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Compare commands listed by 'podman help' against those in 'man podman'.
|
||||
# Recurse into subcommands as well.
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# podman-try - try running a command via PODMAN1; use PODMAN2 as fallback
|
||||
#
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
if pkg-config libselinux 2> /dev/null ; then
|
||||
echo selinux
|
||||
fi
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
SUGGESTION="${SUGGESTION:-sync the vendor.conf and commit all changes.}"
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Usage: test-apiv2 [PORT]
|
||||
#
|
||||
|
@ -23,7 +23,7 @@ load helpers
|
||||
# as a user, the parent directory must be world-readable.
|
||||
test_script=$PODMAN_TMPDIR/fail-if-writable
|
||||
cat >$test_script <<"EOF"
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
path="$1"
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# regression tests for helpers.bash
|
||||
#
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
# test_podman_baseline.sh
|
||||
# A script to be run at the command line with Podman installed.
|
||||
# This should be run against a new kit to provide base level testing
|
||||
@ -215,7 +215,7 @@ podman run $image ls /
|
||||
########
|
||||
FILE=./runecho.sh
|
||||
/bin/cat <<EOM >$FILE
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
for i in {1..9};
|
||||
do
|
||||
echo "This is a new container pull ipbabble [" \$i "]"
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# test_podman_build.sh
|
||||
#
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
# test_podman_pods.sh
|
||||
# A script to be run at the command line with Podman installed.
|
||||
# This should be run against a new kit to provide base level testing
|
||||
|
Reference in New Issue
Block a user