scripts: fix bash path in shebangs

/bin/bash is a Linuxism.  Other operating systems install bash to
different paths.  Use /usr/bin/env in shebangs to find bash.

Signed-off-by: Alan Somers <asomers@gmail.com>
This commit is contained in:
Alan Somers 2017-07-20 16:26:42 -06:00
parent da4286ee0e
commit 3aae5ca6fd
205 changed files with 287 additions and 231 deletions

View File

@ -28,7 +28,7 @@ Other improvements:
easy creation of OSDs.
- RBD is actually buildable and can be used to manage RADOS BLOCK
DEVICEs.
- Most of the awkward dependencies on Linux-isms are deleted only
- Most of the awkward dependencies on Linux-isms are deleted only
/bin/bash is there to stay.
Getting the FreeBSD work on Ceph:

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
pool=rbd
image=my-image

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
lttng create
lttng enable-event -u 'librbd:*'

View File

@ -1,3 +1,3 @@
#!/bin/bash
#!/usr/bin/env bash
../../src/rbd-replay-prep traces/ust/uid/10002/64-bit replay.bin

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
mkdir -p traces
lttng create -o traces librbd

View File

@ -1,4 +1,4 @@
#!/bin/bash -e
#!/usr/bin/env bash
#
# Ceph distributed storage system
#
@ -11,6 +11,7 @@
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
set -e
DIR=/tmp/install-deps.$$
trap "rm -fr $DIR" EXIT
mkdir -p $DIR

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Copyright (C) 2015 Red Hat <contact@redhat.com>
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e
#
# Script to mirror Ceph locally

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Simple script which performs a HTTP and rsync check on
# all Ceph mirrors over IPv4 and IPv6 to see if they are online

View File

@ -1,4 +1,5 @@
#!/bin/bash -x
#!/usr/bin/env bash
set -x
basedir=`echo $0 | sed 's/[^/]*$//g'`.
. $basedir/common.sh

View File

@ -1,4 +1,5 @@
#! /bin/bash -e
#!/usr/bin/env bash
set -e
mount () { :; }
umount () { :; }

View File

@ -1,6 +1,6 @@
#!/bin/bash -x
#!/usr/bin/env bash
set -e
set -ex
basedir=`echo $0 | sed 's/[^/]*$//g'`.
testdir="$1"

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# $1 - part
# $2 - branch name

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#command line => CEPH_BRANCH=<branch>; MACHINE_NAME=<machine_type>; SUITE_NAME=<suite>; ../schedule_subset.sh <day_of_week> $CEPH_BRANCH $MACHINE_NAME $SUITE_NAME $CEPH_QA_EMAIL

View File

@ -1,4 +1,5 @@
#!/bin/bash -x
#!/usr/bin/env bash
set -x
mkdir links
for f in `seq 1 8`

View File

@ -1,4 +1,5 @@
#!/bin/bash -x
#!/usr/bin/env bash
set -x
for f in `seq 1 8`
do

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# /nightlies/cron_wrapper.sh
# check for no argument case and stop

View File

@ -1,4 +1,4 @@
#! /bin/bash
#! /usr/bin/env bash
if [ $# -ne 5 ]; then
echo 'Usage: ceph_install.sh <admin-node> <mon-node> <osd-node> <osd-node> <osd-node>'
exit -1

View File

@ -1,4 +1,4 @@
#! /bin/bash
#! /usr/bin/env bash
if [ -f ~/secrets ]; then
source ~/secrets
fi

View File

@ -1,4 +1,4 @@
#! /bin/bash
#! /usr/bin/env bash
cephnodes=$*
monnode=$1
sudo yum -y install ceph-ansible

View File

@ -1,4 +1,4 @@
#! /bin/bash
#! /usr/bin/env bash
ed /etc/ansible/hosts << EOF
$
a

View File

@ -1,4 +1,4 @@
#! /bin/bash
#! /usr/bin/env bash
ed /usr/share/ceph-ansible/group_vars/osds << EOF
$
/^devices:

View File

@ -1,4 +1,4 @@
#! /bin/bash
#! /usr/bin/env bash
source copy_func.sh
allparms=$*
cmdv=$1

View File

@ -1,4 +1,4 @@
#! /bin/bash
#! /usr/bin/env bash
SPECIFIC_VERSION=latest-Ceph-2-RHEL-7
#SPECIFIC_VERSION=Ceph-2-RHEL-7-20160630.t.0
#SPECIFIC_VERSION=Ceph-2.0-RHEL-7-20160718.t.0

View File

@ -1,4 +1,4 @@
#! /bin/bash
#! /usr/bin/env bash
cmd_wait=$1
shift
sites=$*

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
declare -A rsapub
for fulln in $*; do
sname=`echo $fulln | sed 's/\..*//'`

View File

@ -1,4 +1,6 @@
#!/bin/bash -f
#!/usr/bin/env bash
set -f
#
# On the ceph site, make the pools required for Openstack
#

View File

@ -1,4 +1,6 @@
#! /bin/bash -f
#!/usr/bin/env bash
set -f
echo $OS_CEPH_ISO
if [[ $# -ne 4 ]]; then
echo "Usage: ceph_cluster mon.0 osd.0 osd.1 osd.2"

View File

@ -1,4 +1,5 @@
#!/bin/bash -f
#!/usr/bin/env bash
set -f
#
# Generate a libvirt secret on the Openstack node.

View File

@ -1,4 +1,6 @@
#!/bin/bash -f
#!/usr/bin/env bash
set -f
#
# Remotely setup the stuff needed to run packstack. This should do items 1-4 in
# https://docs.google.com/document/d/1us18KR3LuLyINgGk2rmI-SVj9UksCE7y4C2D_68Aa8o/edit?ts=56a78fcb

View File

@ -1,4 +1,6 @@
#!/bin/bash -fv
#!/usr/bin/env bash
set -fv
#
# Create a glance image, a corresponding cinder volume, a nova instance, attach, the cinder volume to the
# nova instance, and create a backup.

View File

@ -1,4 +1,6 @@
#!/bin/bash -fv
#!/usr/bin/env bash
set -fv
#
# start the Openstack services
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
die() {
echo "$*"

View File

@ -1,4 +1,5 @@
#!/bin/bash -x
#!/usr/bin/env bash
set -x
basedir=`echo $0 | sed 's/[^/]*$//g'`.
. $basedir/common.sh

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Copyright (C) 2012 Dreamhost, LLC
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Copyright (C) 2012 Dreamhost, LLC
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# This is a wrapper around run_xfstests.sh to provide an expunge file
# suitable for krbd xfstests runs.

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# TODO switch to run_xfstests.sh (see run_xfstests_krbd.sh)

View File

@ -1,6 +1,6 @@
#!/bin/bash -x
#!/usr/bin/env bash
set -e
set -ex
basedir=`echo $0 | sed 's/[^/]*$//g'`.
testdir="$1"

View File

@ -1,4 +1,5 @@
#!/bin/bash -x
#!/usr/bin/env bash
set -x
mkdir -p testspace
ceph-fuse testspace -m $1

View File

@ -1,8 +1,9 @@
#!/bin/bash -x
#!/usr/bin/env bash
set -x
mkdir -p testspace
/bin/mount -t ceph $1 testspace
./runallonce.sh testspace
/bin/umount testspace
/bin/umount testspace

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
die() {
echo ${@}

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Copyright (C) 2013,2014 Cloudwatt <libre.licensing@cloudwatt.com>
# Copyright (C) 2014,2015 Red Hat <contact@redhat.com>

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Copyright (C) 2017 Red Hat <contact@redhat.com>
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Copyright (C) 2017 Red Hat <contact@redhat.com>
#

View File

@ -1,4 +1,5 @@
#!/bin/bash -x
#!/usr/bin/env bash
set -x
source $CEPH_ROOT/qa/standalone/ceph-helpers.sh

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Copyright (C) 2014 Cloudwatt <libre.licensing@cloudwatt.com>
# Copyright (C) 2014, 2015 Red Hat <contact@redhat.com>

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Copyright (C) 2015 Red Hat <contact@redhat.com>
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Copyright (C) 2014 Red Hat <contact@redhat.com>
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Copyright (C) 2013,2014 Cloudwatt <libre.licensing@cloudwatt.com>
# Copyright (C) 2014 Red Hat <contact@redhat.com>

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Copyright (C) 2014 Cloudwatt <libre.licensing@cloudwatt.com>
# Copyright (C) 2014, 2015 Red Hat <contact@redhat.com>

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Copyright (C) 2013 Cloudwatt <libre.licensing@cloudwatt.com>
# Copyright (C) 2014 Red Hat <contact@redhat.com>

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Copyright (C) 2017 Quantum Corp.
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Copyright (C) 2015 SUSE LINUX GmbH
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Copyright (C) 2013 Cloudwatt <libre.licensing@cloudwatt.com>
# Copyright (C) 2014,2015 Red Hat <contact@redhat.com>

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Copyright (C) 2015 SUSE LINUX GmbH
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Copyright (C) 2014 Cloudwatt <libre.licensing@cloudwatt.com>
# Copyright (C) 2014, 2015 Red Hat <contact@redhat.com>

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Copyright (C) 2014 Cloudwatt <libre.licensing@cloudwatt.com>
# Copyright (C) 2014, 2015 Red Hat <contact@redhat.com>

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Copyright (C) 2014 Cloudwatt <libre.licensing@cloudwatt.com>
# Copyright (C) 2014, 2015 Red Hat <contact@redhat.com>

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Copyright (C) 2013, 2014 Cloudwatt <libre.licensing@cloudwatt.com>
# Copyright (C) 2014, 2015 Red Hat <contact@redhat.com>

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Generic pool quota test

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Copyright (C) 2014 Cloudwatt <libre.licensing@cloudwatt.com>
# Copyright (C) 2014, 2015 Red Hat <contact@redhat.com>

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Copyright (C) 2014 Cloudwatt <libre.licensing@cloudwatt.com>
# Copyright (C) 2014, 2015 Red Hat <contact@redhat.com>

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Copyright (C) 2014 Cloudwatt <libre.licensing@cloudwatt.com>
# Copyright (C) 2014, 2015 Red Hat <contact@redhat.com>

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
source $CEPH_ROOT/qa/standalone/ceph-helpers.sh

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Copyright (C) 2016 Piotr Dałek <git@predictor.org.pl>
# Copyright (C) 2014, 2015 Red Hat <contact@redhat.com>

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Copyright (C) 2015 Intel <contact@intel.com.com>
# Copyright (C) 2014, 2015 Red Hat <contact@redhat.com>

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Author: Vicente Cheng <freeze.bilsted@gmail.com>
#

View File

@ -1,4 +1,4 @@
#! /bin/bash
#!/usr/bin/env bash
#
# Copyright (C) 2015 Red Hat <contact@redhat.com>
#

View File

@ -1,4 +1,4 @@
#!/bin/bash -x
#!/usr/bin/env bash
#
# Copyright (C) 2014 Red Hat <contact@redhat.com>
#
@ -14,6 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Library Public License for more details.
#
set -x
source $CEPH_ROOT/qa/standalone/ceph-helpers.sh
if [ `uname` = FreeBSD ]; then

View File

@ -1,4 +1,4 @@
#! /bin/bash
#!/usr/bin/env bash
#
# Copyright (C) 2015 Red Hat <contact@redhat.com>
#

View File

@ -7,11 +7,11 @@
# allow passwordless access for debugging
- |
#!/bin/bash
#!/usr/bin/env bash
exec passwd -d ubuntu
- |
#!/bin/bash
#!/usr/bin/env bash
# mount a NFS share for storing logs
apt-get update

View File

@ -1,11 +1,11 @@
- |
#!/bin/bash
#!/usr/bin/env bash
cp /var/log/cloud-init-output.log /mnt/log
- |
#!/bin/bash
#!/usr/bin/env bash
umount /mnt/log
- |
#!/bin/bash
#!/usr/bin/env bash
shutdown -h -P now

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
if [ -f $(dirname $0)/../ceph-helpers-root.sh ]; then
source $(dirname $0)/../ceph-helpers-root.sh
else

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Copyright (C) 2015 Red Hat <contact@redhat.com>
#

View File

@ -1,6 +1,7 @@
#!/bin/bash -x
#!/usr/bin/env bash
# -*- mode:shell-script; tab-width:8; sh-basic-offset:2; indent-tabs-mode:t -*-
# vim: ts=8 sw=8 ft=bash smarttab
set -x
source $(dirname $0)/../../standalone/ceph-helpers.sh

View File

@ -1,6 +1,6 @@
#!/bin/bash -x
#!/usr/bin/env bash
set -e
set -ex
expect_false()
{

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Copyright (C) 2015 Red Hat <contact@redhat.com>
# Copyright (C) 2013,2014 Cloudwatt <libre.licensing@cloudwatt.com>

View File

@ -1,4 +1,4 @@
#!/bin/bash -ex
#!/usr/bin/env bash
#
# Copyright (C) 2014 Red Hat <contact@redhat.com>
#
@ -14,6 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Library Public License for more details.
#
set -ex
: ${CORPUS:=https://github.com/ceph/ceph-erasure-code-corpus.git}
: ${DIRECTORY:=$CEPH_ROOT/ceph-erasure-code-corpus}

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

View File

@ -1,7 +1,6 @@
#!/bin/bash -x
#!/usr/bin/env bash
set -e
set -x
set -ex
# detect data pool
datapool=

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# check if there is file changed while being archived
set -e

View File

@ -1,7 +1,6 @@
#!/bin/bash
#!/usr/bin/env bash
set -e
set -x
set -ex
function expect_false()
{

View File

@ -1,6 +1,6 @@
#!/bin/bash -x
#!/usr/bin/env bash
set -e
set -ex
ceph mds set allow_new_snaps true --yes-i-really-mean-it
@ -28,4 +28,4 @@ rmdir .snap/snap1
rm file?
echo OK
echo OK

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
ceph mds set allow_new_snaps true --yes-i-really-mean-it

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e
set -x

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e
set -x

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e
set -x

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e
set -x

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
tmp=/tmp/cephtest-mon-caps-madness

View File

@ -1,6 +1,6 @@
#!/bin/bash -x
#!/usr/bin/env bash
set -e
set -ex
function expect_false()
{

View File

@ -1,6 +1,6 @@
#!/bin/bash -x
#!/usr/bin/env bash
set -e
set -ex
function expect_false()
{

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# attempt to trigger #6047

View File

@ -1,4 +1,5 @@
#!/bin/bash -ex
#!/usr/bin/env bash
set -ex
what="$1"
[ -z "$what" ] && what=/etc/udev/rules.d

View File

@ -1,4 +1,5 @@
#!/bin/bash -ex
#!/usr/bin/env bash
set -ex
parallel=1
[ "$1" = "--serial" ] && parallel=0

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -ex
shopt -s nullglob # fns glob expansion in expect_alloc_hint_eq()

View File

@ -1,6 +1,6 @@
#!/bin/bash -x
#!/usr/bin/env bash
set -e
set -ex
expect_false()
{

Some files were not shown because too many files have changed in this diff Show More