diff --git a/README.FreeBSD b/README.FreeBSD index 38debddfa86..f1a56118dfe 100644 --- a/README.FreeBSD +++ b/README.FreeBSD @@ -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: diff --git a/examples/rbd-replay/create-image b/examples/rbd-replay/create-image index 3486d98d9db..1792e4c242d 100755 --- a/examples/rbd-replay/create-image +++ b/examples/rbd-replay/create-image @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash pool=rbd image=my-image diff --git a/examples/rbd-replay/replay b/examples/rbd-replay/replay index 42f4f208177..9b138c67836 100755 --- a/examples/rbd-replay/replay +++ b/examples/rbd-replay/replay @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash lttng create lttng enable-event -u 'librbd:*' diff --git a/examples/rbd-replay/run-rbd-replay-prep b/examples/rbd-replay/run-rbd-replay-prep index 28f4876008a..d7e07e9beff 100755 --- a/examples/rbd-replay/run-rbd-replay-prep +++ b/examples/rbd-replay/run-rbd-replay-prep @@ -1,3 +1,3 @@ -#!/bin/bash +#!/usr/bin/env bash ../../src/rbd-replay-prep traces/ust/uid/10002/64-bit replay.bin diff --git a/examples/rbd-replay/trace b/examples/rbd-replay/trace index 02a53589ef9..9a73693c5cf 100755 --- a/examples/rbd-replay/trace +++ b/examples/rbd-replay/trace @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash mkdir -p traces lttng create -o traces librbd diff --git a/install-deps.sh b/install-deps.sh index bb10f9a753a..35b054f42b1 100755 --- a/install-deps.sh +++ b/install-deps.sh @@ -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 diff --git a/make-debs.sh b/make-debs.sh index 705d88de38c..26582f183b8 100755 --- a/make-debs.sh +++ b/make-debs.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Copyright (C) 2015 Red Hat # diff --git a/mirroring/mirror-ceph.sh b/mirroring/mirror-ceph.sh index ef80a63f93e..49bafad4255 100755 --- a/mirroring/mirror-ceph.sh +++ b/mirroring/mirror-ceph.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e # # Script to mirror Ceph locally diff --git a/mirroring/test-mirrors.sh b/mirroring/test-mirrors.sh index 4b6392bf45e..280118bc845 100755 --- a/mirroring/test-mirrors.sh +++ b/mirroring/test-mirrors.sh @@ -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 diff --git a/qa/client/30_subdir_mount.sh b/qa/client/30_subdir_mount.sh index 00f4f020e5d..0bdf2ed1ab5 100755 --- a/qa/client/30_subdir_mount.sh +++ b/qa/client/30_subdir_mount.sh @@ -1,4 +1,5 @@ -#!/bin/bash -x +#!/usr/bin/env bash +set -x basedir=`echo $0 | sed 's/[^/]*$//g'`. . $basedir/common.sh diff --git a/qa/client/gen-1774.sh b/qa/client/gen-1774.sh index ab592667c0a..3ee5bc90dd0 100644 --- a/qa/client/gen-1774.sh +++ b/qa/client/gen-1774.sh @@ -1,4 +1,5 @@ -#! /bin/bash -e +#!/usr/bin/env bash +set -e mount () { :; } umount () { :; } diff --git a/qa/loopall.sh b/qa/loopall.sh index edc14a02142..d69e8c7204c 100755 --- a/qa/loopall.sh +++ b/qa/loopall.sh @@ -1,6 +1,6 @@ -#!/bin/bash -x +#!/usr/bin/env bash -set -e +set -ex basedir=`echo $0 | sed 's/[^/]*$//g'`. testdir="$1" diff --git a/qa/machine_types/schedule_rados_ovh.sh b/qa/machine_types/schedule_rados_ovh.sh index afaec747e92..cefa98b6a95 100755 --- a/qa/machine_types/schedule_rados_ovh.sh +++ b/qa/machine_types/schedule_rados_ovh.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # $1 - part # $2 - branch name diff --git a/qa/machine_types/schedule_subset.sh b/qa/machine_types/schedule_subset.sh index 30a378d20ec..fa75f13bedd 100755 --- a/qa/machine_types/schedule_subset.sh +++ b/qa/machine_types/schedule_subset.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash #command line => CEPH_BRANCH=; MACHINE_NAME=; SUITE_NAME=; ../schedule_subset.sh $CEPH_BRANCH $MACHINE_NAME $SUITE_NAME $CEPH_QA_EMAIL diff --git a/qa/mds/test_anchortable.sh b/qa/mds/test_anchortable.sh index 56be0fb56a0..1bf2494de18 100755 --- a/qa/mds/test_anchortable.sh +++ b/qa/mds/test_anchortable.sh @@ -1,4 +1,5 @@ -#!/bin/bash -x +#!/usr/bin/env bash +set -x mkdir links for f in `seq 1 8` diff --git a/qa/mds/test_mdstable_failures.sh b/qa/mds/test_mdstable_failures.sh index b5f80791572..c959995cf25 100755 --- a/qa/mds/test_mdstable_failures.sh +++ b/qa/mds/test_mdstable_failures.sh @@ -1,4 +1,5 @@ -#!/bin/bash -x +#!/usr/bin/env bash +set -x for f in `seq 1 8` do diff --git a/qa/nightlies/cron_wrapper b/qa/nightlies/cron_wrapper index ced5a32b083..29b4483e99c 100755 --- a/qa/nightlies/cron_wrapper +++ b/qa/nightlies/cron_wrapper @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # /nightlies/cron_wrapper.sh # check for no argument case and stop diff --git a/qa/qa_scripts/openstack/ceph_install_w_ansible/ceph_install.sh b/qa/qa_scripts/openstack/ceph_install_w_ansible/ceph_install.sh index 76a2e8a6422..b4d14f9c2eb 100755 --- a/qa/qa_scripts/openstack/ceph_install_w_ansible/ceph_install.sh +++ b/qa/qa_scripts/openstack/ceph_install_w_ansible/ceph_install.sh @@ -1,4 +1,4 @@ -#! /bin/bash +#! /usr/bin/env bash if [ $# -ne 5 ]; then echo 'Usage: ceph_install.sh ' exit -1 diff --git a/qa/qa_scripts/openstack/ceph_install_w_ansible/execs/cdn_setup.sh b/qa/qa_scripts/openstack/ceph_install_w_ansible/execs/cdn_setup.sh index 5f2d05ac80d..0c87039dbdb 100755 --- a/qa/qa_scripts/openstack/ceph_install_w_ansible/execs/cdn_setup.sh +++ b/qa/qa_scripts/openstack/ceph_install_w_ansible/execs/cdn_setup.sh @@ -1,4 +1,4 @@ -#! /bin/bash +#! /usr/bin/env bash if [ -f ~/secrets ]; then source ~/secrets fi diff --git a/qa/qa_scripts/openstack/ceph_install_w_ansible/execs/ceph_ansible.sh b/qa/qa_scripts/openstack/ceph_install_w_ansible/execs/ceph_ansible.sh index 6a2a2ba5b92..8581de601c3 100755 --- a/qa/qa_scripts/openstack/ceph_install_w_ansible/execs/ceph_ansible.sh +++ b/qa/qa_scripts/openstack/ceph_install_w_ansible/execs/ceph_ansible.sh @@ -1,4 +1,4 @@ -#! /bin/bash +#! /usr/bin/env bash cephnodes=$* monnode=$1 sudo yum -y install ceph-ansible diff --git a/qa/qa_scripts/openstack/ceph_install_w_ansible/execs/edit_ansible_hosts.sh b/qa/qa_scripts/openstack/ceph_install_w_ansible/execs/edit_ansible_hosts.sh index c3d8df6b2bf..7eb0b701121 100755 --- a/qa/qa_scripts/openstack/ceph_install_w_ansible/execs/edit_ansible_hosts.sh +++ b/qa/qa_scripts/openstack/ceph_install_w_ansible/execs/edit_ansible_hosts.sh @@ -1,4 +1,4 @@ -#! /bin/bash +#! /usr/bin/env bash ed /etc/ansible/hosts << EOF $ a diff --git a/qa/qa_scripts/openstack/ceph_install_w_ansible/execs/edit_groupvars_osds.sh b/qa/qa_scripts/openstack/ceph_install_w_ansible/execs/edit_groupvars_osds.sh index a62ef140072..751658b096f 100755 --- a/qa/qa_scripts/openstack/ceph_install_w_ansible/execs/edit_groupvars_osds.sh +++ b/qa/qa_scripts/openstack/ceph_install_w_ansible/execs/edit_groupvars_osds.sh @@ -1,4 +1,4 @@ -#! /bin/bash +#! /usr/bin/env bash ed /usr/share/ceph-ansible/group_vars/osds << EOF $ /^devices: diff --git a/qa/qa_scripts/openstack/ceph_install_w_ansible/multi_action.sh b/qa/qa_scripts/openstack/ceph_install_w_ansible/multi_action.sh index 9fc2dde2604..abc368b0a12 100755 --- a/qa/qa_scripts/openstack/ceph_install_w_ansible/multi_action.sh +++ b/qa/qa_scripts/openstack/ceph_install_w_ansible/multi_action.sh @@ -1,4 +1,4 @@ -#! /bin/bash +#! /usr/bin/env bash source copy_func.sh allparms=$* cmdv=$1 diff --git a/qa/qa_scripts/openstack/ceph_install_w_ansible/repolocs.sh b/qa/qa_scripts/openstack/ceph_install_w_ansible/repolocs.sh index e4b74af18ad..5d82f35d9f5 100755 --- a/qa/qa_scripts/openstack/ceph_install_w_ansible/repolocs.sh +++ b/qa/qa_scripts/openstack/ceph_install_w_ansible/repolocs.sh @@ -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 diff --git a/qa/qa_scripts/openstack/ceph_install_w_ansible/staller.sh b/qa/qa_scripts/openstack/ceph_install_w_ansible/staller.sh index 2e560024cb8..99c00da33e1 100755 --- a/qa/qa_scripts/openstack/ceph_install_w_ansible/staller.sh +++ b/qa/qa_scripts/openstack/ceph_install_w_ansible/staller.sh @@ -1,4 +1,4 @@ -#! /bin/bash +#! /usr/bin/env bash cmd_wait=$1 shift sites=$* diff --git a/qa/qa_scripts/openstack/ceph_install_w_ansible/talknice.sh b/qa/qa_scripts/openstack/ceph_install_w_ansible/talknice.sh index 6b538cd6bcf..ffed4f1dcd5 100755 --- a/qa/qa_scripts/openstack/ceph_install_w_ansible/talknice.sh +++ b/qa/qa_scripts/openstack/ceph_install_w_ansible/talknice.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash declare -A rsapub for fulln in $*; do sname=`echo $fulln | sed 's/\..*//'` diff --git a/qa/qa_scripts/openstack/execs/ceph-pool-create.sh b/qa/qa_scripts/openstack/execs/ceph-pool-create.sh index 0bd50b7977b..723c8306916 100755 --- a/qa/qa_scripts/openstack/execs/ceph-pool-create.sh +++ b/qa/qa_scripts/openstack/execs/ceph-pool-create.sh @@ -1,4 +1,6 @@ -#!/bin/bash -f +#!/usr/bin/env bash +set -f + # # On the ceph site, make the pools required for Openstack # diff --git a/qa/qa_scripts/openstack/execs/ceph_cluster.sh b/qa/qa_scripts/openstack/execs/ceph_cluster.sh index 86cb15ee379..5afb3c7879b 100755 --- a/qa/qa_scripts/openstack/execs/ceph_cluster.sh +++ b/qa/qa_scripts/openstack/execs/ceph_cluster.sh @@ -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" diff --git a/qa/qa_scripts/openstack/execs/libvirt-secret.sh b/qa/qa_scripts/openstack/execs/libvirt-secret.sh index 63ef679be47..75e9e91a0c7 100755 --- a/qa/qa_scripts/openstack/execs/libvirt-secret.sh +++ b/qa/qa_scripts/openstack/execs/libvirt-secret.sh @@ -1,4 +1,5 @@ -#!/bin/bash -f +#!/usr/bin/env bash +set -f # # Generate a libvirt secret on the Openstack node. diff --git a/qa/qa_scripts/openstack/execs/openstack-preinstall.sh b/qa/qa_scripts/openstack/execs/openstack-preinstall.sh index 1439c08e31e..a2b235e76f3 100755 --- a/qa/qa_scripts/openstack/execs/openstack-preinstall.sh +++ b/qa/qa_scripts/openstack/execs/openstack-preinstall.sh @@ -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 diff --git a/qa/qa_scripts/openstack/execs/run_openstack.sh b/qa/qa_scripts/openstack/execs/run_openstack.sh index 92465c4afd2..8764cbeb61d 100755 --- a/qa/qa_scripts/openstack/execs/run_openstack.sh +++ b/qa/qa_scripts/openstack/execs/run_openstack.sh @@ -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. diff --git a/qa/qa_scripts/openstack/execs/start_openstack.sh b/qa/qa_scripts/openstack/execs/start_openstack.sh index b81c815d6e7..f5f12fe50c8 100755 --- a/qa/qa_scripts/openstack/execs/start_openstack.sh +++ b/qa/qa_scripts/openstack/execs/start_openstack.sh @@ -1,4 +1,6 @@ -#!/bin/bash -fv +#!/usr/bin/env bash +set -fv + # # start the Openstack services # diff --git a/qa/rbd/common.sh b/qa/rbd/common.sh index e1926f7f9c0..232cf45adb4 100644 --- a/qa/rbd/common.sh +++ b/qa/rbd/common.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash die() { echo "$*" diff --git a/qa/rbd/rbd.sh b/qa/rbd/rbd.sh index 1ef67e6c2ee..2b7ce8ee2e8 100755 --- a/qa/rbd/rbd.sh +++ b/qa/rbd/rbd.sh @@ -1,4 +1,5 @@ -#!/bin/bash -x +#!/usr/bin/env bash +set -x basedir=`echo $0 | sed 's/[^/]*$//g'`. . $basedir/common.sh diff --git a/qa/run_xfstests-obsolete.sh b/qa/run_xfstests-obsolete.sh index 9845d08d5d9..4393c7c866c 100644 --- a/qa/run_xfstests-obsolete.sh +++ b/qa/run_xfstests-obsolete.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (C) 2012 Dreamhost, LLC # diff --git a/qa/run_xfstests.sh b/qa/run_xfstests.sh index 4a782ba73da..a889fe5d05d 100644 --- a/qa/run_xfstests.sh +++ b/qa/run_xfstests.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (C) 2012 Dreamhost, LLC # diff --git a/qa/run_xfstests_krbd.sh b/qa/run_xfstests_krbd.sh index aafc0f1b511..1b8bab0f92b 100644 --- a/qa/run_xfstests_krbd.sh +++ b/qa/run_xfstests_krbd.sh @@ -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. diff --git a/qa/run_xfstests_qemu.sh b/qa/run_xfstests_qemu.sh index a15f598256c..40300cea6fe 100644 --- a/qa/run_xfstests_qemu.sh +++ b/qa/run_xfstests_qemu.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # TODO switch to run_xfstests.sh (see run_xfstests_krbd.sh) diff --git a/qa/runallonce.sh b/qa/runallonce.sh index 573046959a9..bd809fef73e 100755 --- a/qa/runallonce.sh +++ b/qa/runallonce.sh @@ -1,6 +1,6 @@ -#!/bin/bash -x +#!/usr/bin/env bash -set -e +set -ex basedir=`echo $0 | sed 's/[^/]*$//g'`. testdir="$1" diff --git a/qa/runoncfuse.sh b/qa/runoncfuse.sh index c1a5b0106e6..7be545356d2 100755 --- a/qa/runoncfuse.sh +++ b/qa/runoncfuse.sh @@ -1,4 +1,5 @@ -#!/bin/bash -x +#!/usr/bin/env bash +set -x mkdir -p testspace ceph-fuse testspace -m $1 diff --git a/qa/runonkclient.sh b/qa/runonkclient.sh index fd76718af6a..f7e8605faf0 100755 --- a/qa/runonkclient.sh +++ b/qa/runonkclient.sh @@ -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 \ No newline at end of file +/bin/umount testspace diff --git a/qa/setup-chroot.sh b/qa/setup-chroot.sh index 2e5ef46be79..a6e12f35638 100755 --- a/qa/setup-chroot.sh +++ b/qa/setup-chroot.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash die() { echo ${@} diff --git a/qa/standalone/ceph-helpers.sh b/qa/standalone/ceph-helpers.sh index 219e3019420..85186eb0459 100755 --- a/qa/standalone/ceph-helpers.sh +++ b/qa/standalone/ceph-helpers.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Copyright (C) 2013,2014 Cloudwatt # Copyright (C) 2014,2015 Red Hat diff --git a/qa/standalone/crush/crush-choose-args.sh b/qa/standalone/crush/crush-choose-args.sh index 6e03a999c64..2b8aa44330f 100755 --- a/qa/standalone/crush/crush-choose-args.sh +++ b/qa/standalone/crush/crush-choose-args.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Copyright (C) 2017 Red Hat # diff --git a/qa/standalone/crush/crush-classes.sh b/qa/standalone/crush/crush-classes.sh index 1cbc6f5f7a8..7aaffa87d92 100755 --- a/qa/standalone/crush/crush-classes.sh +++ b/qa/standalone/crush/crush-classes.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Copyright (C) 2017 Red Hat # diff --git a/qa/standalone/erasure-code/test-erasure-code-plugins.sh b/qa/standalone/erasure-code/test-erasure-code-plugins.sh index 26aff64aa1a..b5648d472b9 100755 --- a/qa/standalone/erasure-code/test-erasure-code-plugins.sh +++ b/qa/standalone/erasure-code/test-erasure-code-plugins.sh @@ -1,4 +1,5 @@ -#!/bin/bash -x +#!/usr/bin/env bash +set -x source $CEPH_ROOT/qa/standalone/ceph-helpers.sh diff --git a/qa/standalone/erasure-code/test-erasure-code.sh b/qa/standalone/erasure-code/test-erasure-code.sh index 95126ead058..89705e1980e 100755 --- a/qa/standalone/erasure-code/test-erasure-code.sh +++ b/qa/standalone/erasure-code/test-erasure-code.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Copyright (C) 2014 Cloudwatt # Copyright (C) 2014, 2015 Red Hat diff --git a/qa/standalone/erasure-code/test-erasure-eio.sh b/qa/standalone/erasure-code/test-erasure-eio.sh index 678088e9414..7503322fca6 100755 --- a/qa/standalone/erasure-code/test-erasure-eio.sh +++ b/qa/standalone/erasure-code/test-erasure-eio.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Copyright (C) 2015 Red Hat # diff --git a/qa/standalone/misc/rados-striper.sh b/qa/standalone/misc/rados-striper.sh index 03151531cd8..be6349b815f 100755 --- a/qa/standalone/misc/rados-striper.sh +++ b/qa/standalone/misc/rados-striper.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Copyright (C) 2014 Red Hat # diff --git a/qa/standalone/misc/test-ceph-helpers.sh b/qa/standalone/misc/test-ceph-helpers.sh index 3a6788ecaa3..994a8a6ebbd 100755 --- a/qa/standalone/misc/test-ceph-helpers.sh +++ b/qa/standalone/misc/test-ceph-helpers.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Copyright (C) 2013,2014 Cloudwatt # Copyright (C) 2014 Red Hat diff --git a/qa/standalone/mon/misc.sh b/qa/standalone/mon/misc.sh index 8abf6c5b125..adcbe8b5194 100755 --- a/qa/standalone/mon/misc.sh +++ b/qa/standalone/mon/misc.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Copyright (C) 2014 Cloudwatt # Copyright (C) 2014, 2015 Red Hat diff --git a/qa/standalone/mon/mkfs.sh b/qa/standalone/mon/mkfs.sh index 6b8e58d8a37..3a4f07bb0b8 100755 --- a/qa/standalone/mon/mkfs.sh +++ b/qa/standalone/mon/mkfs.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Copyright (C) 2013 Cloudwatt # Copyright (C) 2014 Red Hat diff --git a/qa/standalone/mon/mon-bind.sh b/qa/standalone/mon/mon-bind.sh index f87157c78ab..fa8f67904a7 100755 --- a/qa/standalone/mon/mon-bind.sh +++ b/qa/standalone/mon/mon-bind.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Copyright (C) 2017 Quantum Corp. # diff --git a/qa/standalone/mon/mon-created-time.sh b/qa/standalone/mon/mon-created-time.sh index 0955803ae74..4b8446059e5 100755 --- a/qa/standalone/mon/mon-created-time.sh +++ b/qa/standalone/mon/mon-created-time.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Copyright (C) 2015 SUSE LINUX GmbH # diff --git a/qa/standalone/mon/mon-handle-forward.sh b/qa/standalone/mon/mon-handle-forward.sh index e3b539bf7b7..097c27c4d6a 100755 --- a/qa/standalone/mon/mon-handle-forward.sh +++ b/qa/standalone/mon/mon-handle-forward.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Copyright (C) 2013 Cloudwatt # Copyright (C) 2014,2015 Red Hat diff --git a/qa/standalone/mon/mon-ping.sh b/qa/standalone/mon/mon-ping.sh index 9574f5f0f9b..1f5096be1b5 100755 --- a/qa/standalone/mon/mon-ping.sh +++ b/qa/standalone/mon/mon-ping.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Copyright (C) 2015 SUSE LINUX GmbH # diff --git a/qa/standalone/mon/mon-scrub.sh b/qa/standalone/mon/mon-scrub.sh index b40a6bc6740..158bd434ca0 100755 --- a/qa/standalone/mon/mon-scrub.sh +++ b/qa/standalone/mon/mon-scrub.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Copyright (C) 2014 Cloudwatt # Copyright (C) 2014, 2015 Red Hat diff --git a/qa/standalone/mon/osd-crush.sh b/qa/standalone/mon/osd-crush.sh index 747e30db5ae..84a6be2a9e8 100755 --- a/qa/standalone/mon/osd-crush.sh +++ b/qa/standalone/mon/osd-crush.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Copyright (C) 2014 Cloudwatt # Copyright (C) 2014, 2015 Red Hat diff --git a/qa/standalone/mon/osd-erasure-code-profile.sh b/qa/standalone/mon/osd-erasure-code-profile.sh index 6bfc2587f8b..dfa99b5e132 100755 --- a/qa/standalone/mon/osd-erasure-code-profile.sh +++ b/qa/standalone/mon/osd-erasure-code-profile.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Copyright (C) 2014 Cloudwatt # Copyright (C) 2014, 2015 Red Hat diff --git a/qa/standalone/mon/osd-pool-create.sh b/qa/standalone/mon/osd-pool-create.sh index 99a6064c0ae..dd2aa717a6d 100755 --- a/qa/standalone/mon/osd-pool-create.sh +++ b/qa/standalone/mon/osd-pool-create.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Copyright (C) 2013, 2014 Cloudwatt # Copyright (C) 2014, 2015 Red Hat diff --git a/qa/standalone/mon/test_pool_quota.sh b/qa/standalone/mon/test_pool_quota.sh index dcf89fd26e2..bdc8cb638a8 100755 --- a/qa/standalone/mon/test_pool_quota.sh +++ b/qa/standalone/mon/test_pool_quota.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Generic pool quota test diff --git a/qa/standalone/osd/osd-bench.sh b/qa/standalone/osd/osd-bench.sh index 59a6f8d8d7e..5bcbe3776eb 100755 --- a/qa/standalone/osd/osd-bench.sh +++ b/qa/standalone/osd/osd-bench.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Copyright (C) 2014 Cloudwatt # Copyright (C) 2014, 2015 Red Hat diff --git a/qa/standalone/osd/osd-config.sh b/qa/standalone/osd/osd-config.sh index d2dfe992848..99312b94f17 100755 --- a/qa/standalone/osd/osd-config.sh +++ b/qa/standalone/osd/osd-config.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Copyright (C) 2014 Cloudwatt # Copyright (C) 2014, 2015 Red Hat diff --git a/qa/standalone/osd/osd-copy-from.sh b/qa/standalone/osd/osd-copy-from.sh index 3dcb0a8fa52..8ac0ab541d8 100755 --- a/qa/standalone/osd/osd-copy-from.sh +++ b/qa/standalone/osd/osd-copy-from.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Copyright (C) 2014 Cloudwatt # Copyright (C) 2014, 2015 Red Hat diff --git a/qa/standalone/osd/osd-dup.sh b/qa/standalone/osd/osd-dup.sh index a1bd1af5d62..554648a5d03 100755 --- a/qa/standalone/osd/osd-dup.sh +++ b/qa/standalone/osd/osd-dup.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash source $CEPH_ROOT/qa/standalone/ceph-helpers.sh diff --git a/qa/standalone/osd/osd-fast-mark-down.sh b/qa/standalone/osd/osd-fast-mark-down.sh index 3b8e5a31b50..42584414dc1 100755 --- a/qa/standalone/osd/osd-fast-mark-down.sh +++ b/qa/standalone/osd/osd-fast-mark-down.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Copyright (C) 2016 Piotr Dałek # Copyright (C) 2014, 2015 Red Hat diff --git a/qa/standalone/osd/osd-markdown.sh b/qa/standalone/osd/osd-markdown.sh index b3c800c081d..e99f23938db 100755 --- a/qa/standalone/osd/osd-markdown.sh +++ b/qa/standalone/osd/osd-markdown.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Copyright (C) 2015 Intel # Copyright (C) 2014, 2015 Red Hat diff --git a/qa/standalone/osd/osd-reactivate.sh b/qa/standalone/osd/osd-reactivate.sh index ddeee951a9e..6d6438629dc 100755 --- a/qa/standalone/osd/osd-reactivate.sh +++ b/qa/standalone/osd/osd-reactivate.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Author: Vicente Cheng # diff --git a/qa/standalone/osd/osd-reuse-id.sh b/qa/standalone/osd/osd-reuse-id.sh index 807c0abe5cb..9fd875d1796 100755 --- a/qa/standalone/osd/osd-reuse-id.sh +++ b/qa/standalone/osd/osd-reuse-id.sh @@ -1,4 +1,4 @@ -#! /bin/bash +#!/usr/bin/env bash # # Copyright (C) 2015 Red Hat # diff --git a/qa/standalone/scrub/osd-scrub-repair.sh b/qa/standalone/scrub/osd-scrub-repair.sh index 14b933233fa..1f46b4c1952 100755 --- a/qa/standalone/scrub/osd-scrub-repair.sh +++ b/qa/standalone/scrub/osd-scrub-repair.sh @@ -1,4 +1,4 @@ -#!/bin/bash -x +#!/usr/bin/env bash # # Copyright (C) 2014 Red Hat # @@ -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 diff --git a/qa/standalone/scrub/osd-scrub-snaps.sh b/qa/standalone/scrub/osd-scrub-snaps.sh index 020363683e9..efd7f1a04c2 100755 --- a/qa/standalone/scrub/osd-scrub-snaps.sh +++ b/qa/standalone/scrub/osd-scrub-snaps.sh @@ -1,4 +1,4 @@ -#! /bin/bash +#!/usr/bin/env bash # # Copyright (C) 2015 Red Hat # diff --git a/qa/tasks/userdata_setup.yaml b/qa/tasks/userdata_setup.yaml index d39695bef0f..7271925c9f7 100644 --- a/qa/tasks/userdata_setup.yaml +++ b/qa/tasks/userdata_setup.yaml @@ -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 diff --git a/qa/tasks/userdata_teardown.yaml b/qa/tasks/userdata_teardown.yaml index 7f3d64ff742..731d769f0c9 100644 --- a/qa/tasks/userdata_teardown.yaml +++ b/qa/tasks/userdata_teardown.yaml @@ -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 diff --git a/qa/workunits/ceph-disk/ceph-disk.sh b/qa/workunits/ceph-disk/ceph-disk.sh index 7a795b925d6..b9af6254ffd 100755 --- a/qa/workunits/ceph-disk/ceph-disk.sh +++ b/qa/workunits/ceph-disk/ceph-disk.sh @@ -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 diff --git a/qa/workunits/ceph-helpers-root.sh b/qa/workunits/ceph-helpers-root.sh index f65f591f4c8..c54dbde7adb 100755 --- a/qa/workunits/ceph-helpers-root.sh +++ b/qa/workunits/ceph-helpers-root.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Copyright (C) 2015 Red Hat # diff --git a/qa/workunits/cephtool/test.sh b/qa/workunits/cephtool/test.sh index 1d0051aa88d..da5a273c150 100755 --- a/qa/workunits/cephtool/test.sh +++ b/qa/workunits/cephtool/test.sh @@ -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 diff --git a/qa/workunits/cephtool/test_daemon.sh b/qa/workunits/cephtool/test_daemon.sh index 413f7084f90..08ae937cc3f 100755 --- a/qa/workunits/cephtool/test_daemon.sh +++ b/qa/workunits/cephtool/test_daemon.sh @@ -1,6 +1,6 @@ -#!/bin/bash -x +#!/usr/bin/env bash -set -e +set -ex expect_false() { diff --git a/qa/workunits/erasure-code/bench.sh b/qa/workunits/erasure-code/bench.sh index e2bec8edd27..7f4030481f7 100755 --- a/qa/workunits/erasure-code/bench.sh +++ b/qa/workunits/erasure-code/bench.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Copyright (C) 2015 Red Hat # Copyright (C) 2013,2014 Cloudwatt diff --git a/qa/workunits/erasure-code/encode-decode-non-regression.sh b/qa/workunits/erasure-code/encode-decode-non-regression.sh index 2a65d5968de..7f36c91c7a7 100755 --- a/qa/workunits/erasure-code/encode-decode-non-regression.sh +++ b/qa/workunits/erasure-code/encode-decode-non-regression.sh @@ -1,4 +1,4 @@ -#!/bin/bash -ex +#!/usr/bin/env bash # # Copyright (C) 2014 Red Hat # @@ -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} diff --git a/qa/workunits/fs/misc/dirfrag.sh b/qa/workunits/fs/misc/dirfrag.sh index c059f88cad3..eea0ec3bc47 100755 --- a/qa/workunits/fs/misc/dirfrag.sh +++ b/qa/workunits/fs/misc/dirfrag.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e diff --git a/qa/workunits/fs/misc/layout_vxattrs.sh b/qa/workunits/fs/misc/layout_vxattrs.sh index 29ac407ebb4..81133627347 100755 --- a/qa/workunits/fs/misc/layout_vxattrs.sh +++ b/qa/workunits/fs/misc/layout_vxattrs.sh @@ -1,7 +1,6 @@ -#!/bin/bash -x +#!/usr/bin/env bash -set -e -set -x +set -ex # detect data pool datapool= diff --git a/qa/workunits/fs/misc/mkpool_layout_vxattrs.sh b/qa/workunits/fs/misc/mkpool_layout_vxattrs.sh index 91d31664898..119386b3eb8 100755 --- a/qa/workunits/fs/misc/mkpool_layout_vxattrs.sh +++ b/qa/workunits/fs/misc/mkpool_layout_vxattrs.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e diff --git a/qa/workunits/fs/misc/trivial_sync.sh b/qa/workunits/fs/misc/trivial_sync.sh index 68e40722928..7c8c4e2b4e4 100755 --- a/qa/workunits/fs/misc/trivial_sync.sh +++ b/qa/workunits/fs/misc/trivial_sync.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e diff --git a/qa/workunits/fs/norstats/kernel_untar_tar.sh b/qa/workunits/fs/norstats/kernel_untar_tar.sh index 63f8c745b38..6a175dcd9d6 100755 --- a/qa/workunits/fs/norstats/kernel_untar_tar.sh +++ b/qa/workunits/fs/norstats/kernel_untar_tar.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # check if there is file changed while being archived set -e diff --git a/qa/workunits/fs/quota/quota.sh b/qa/workunits/fs/quota/quota.sh index ff27a613add..1315be6d860 100755 --- a/qa/workunits/fs/quota/quota.sh +++ b/qa/workunits/fs/quota/quota.sh @@ -1,7 +1,6 @@ -#!/bin/bash +#!/usr/bin/env bash -set -e -set -x +set -ex function expect_false() { diff --git a/qa/workunits/fs/snaps/snaptest-1.sh b/qa/workunits/fs/snaps/snaptest-1.sh index f8fb61498c2..4d892ca38a9 100755 --- a/qa/workunits/fs/snaps/snaptest-1.sh +++ b/qa/workunits/fs/snaps/snaptest-1.sh @@ -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 \ No newline at end of file +echo OK diff --git a/qa/workunits/fs/snaps/snaptest-2.sh b/qa/workunits/fs/snaps/snaptest-2.sh index b2458d9b289..a4438f72946 100755 --- a/qa/workunits/fs/snaps/snaptest-2.sh +++ b/qa/workunits/fs/snaps/snaptest-2.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash ceph mds set allow_new_snaps true --yes-i-really-mean-it diff --git a/qa/workunits/hadoop/repl.sh b/qa/workunits/hadoop/repl.sh index f2e9fccbd30..060091c3006 100755 --- a/qa/workunits/hadoop/repl.sh +++ b/qa/workunits/hadoop/repl.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e set -x diff --git a/qa/workunits/hadoop/terasort.sh b/qa/workunits/hadoop/terasort.sh index 7996aece7ea..3d6988a21d7 100755 --- a/qa/workunits/hadoop/terasort.sh +++ b/qa/workunits/hadoop/terasort.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e set -x diff --git a/qa/workunits/hadoop/wordcount.sh b/qa/workunits/hadoop/wordcount.sh index 1ff057a7f4a..616b08af20a 100755 --- a/qa/workunits/hadoop/wordcount.sh +++ b/qa/workunits/hadoop/wordcount.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e set -x diff --git a/qa/workunits/kernel_untar_build.sh b/qa/workunits/kernel_untar_build.sh index 93fee1f5b3e..1182aafc166 100755 --- a/qa/workunits/kernel_untar_build.sh +++ b/qa/workunits/kernel_untar_build.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e diff --git a/qa/workunits/mon/auth_caps.sh b/qa/workunits/mon/auth_caps.sh index b8c10947424..1f59ae1f734 100755 --- a/qa/workunits/mon/auth_caps.sh +++ b/qa/workunits/mon/auth_caps.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e set -x diff --git a/qa/workunits/mon/caps.sh b/qa/workunits/mon/caps.sh index e00247d9c9b..134d514c4ed 100755 --- a/qa/workunits/mon/caps.sh +++ b/qa/workunits/mon/caps.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash tmp=/tmp/cephtest-mon-caps-madness diff --git a/qa/workunits/mon/crush_ops.sh b/qa/workunits/mon/crush_ops.sh index 11f0b4f4ae5..04875b3aee8 100755 --- a/qa/workunits/mon/crush_ops.sh +++ b/qa/workunits/mon/crush_ops.sh @@ -1,6 +1,6 @@ -#!/bin/bash -x +#!/usr/bin/env bash -set -e +set -ex function expect_false() { diff --git a/qa/workunits/mon/pool_ops.sh b/qa/workunits/mon/pool_ops.sh index b19dbd167cc..a336fd544e7 100755 --- a/qa/workunits/mon/pool_ops.sh +++ b/qa/workunits/mon/pool_ops.sh @@ -1,6 +1,6 @@ -#!/bin/bash -x +#!/usr/bin/env bash -set -e +set -ex function expect_false() { diff --git a/qa/workunits/mon/rbd_snaps_ops.sh b/qa/workunits/mon/rbd_snaps_ops.sh index 3ff7e760337..7ae83477f7c 100755 --- a/qa/workunits/mon/rbd_snaps_ops.sh +++ b/qa/workunits/mon/rbd_snaps_ops.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # attempt to trigger #6047 diff --git a/qa/workunits/post-file.sh b/qa/workunits/post-file.sh index 133e66867c0..120fb263461 100755 --- a/qa/workunits/post-file.sh +++ b/qa/workunits/post-file.sh @@ -1,4 +1,5 @@ -#!/bin/bash -ex +#!/usr/bin/env bash +set -ex what="$1" [ -z "$what" ] && what=/etc/udev/rules.d diff --git a/qa/workunits/rados/test.sh b/qa/workunits/rados/test.sh index cbf398fe65f..871c2310db8 100755 --- a/qa/workunits/rados/test.sh +++ b/qa/workunits/rados/test.sh @@ -1,4 +1,5 @@ -#!/bin/bash -ex +#!/usr/bin/env bash +set -ex parallel=1 [ "$1" = "--serial" ] && parallel=0 diff --git a/qa/workunits/rados/test_alloc_hint.sh b/qa/workunits/rados/test_alloc_hint.sh index 3e246949df4..ac7877ddaab 100755 --- a/qa/workunits/rados/test_alloc_hint.sh +++ b/qa/workunits/rados/test_alloc_hint.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -ex shopt -s nullglob # fns glob expansion in expect_alloc_hint_eq() diff --git a/qa/workunits/rados/test_cache_pool.sh b/qa/workunits/rados/test_cache_pool.sh index 5975893600a..5e28b355aba 100755 --- a/qa/workunits/rados/test_cache_pool.sh +++ b/qa/workunits/rados/test_cache_pool.sh @@ -1,6 +1,6 @@ -#!/bin/bash -x +#!/usr/bin/env bash -set -e +set -ex expect_false() { diff --git a/qa/workunits/rados/test_envlibrados_for_rocksdb.sh b/qa/workunits/rados/test_envlibrados_for_rocksdb.sh index 94580c234ca..d24a87bef25 100755 --- a/qa/workunits/rados/test_envlibrados_for_rocksdb.sh +++ b/qa/workunits/rados/test_envlibrados_for_rocksdb.sh @@ -1,4 +1,6 @@ -#!/bin/bash -ex +#!/usr/bin/env bash +set -ex + ############################################ # Helper functions ############################################ diff --git a/qa/workunits/rados/test_health_warnings.sh b/qa/workunits/rados/test_health_warnings.sh index 8bf60065f01..599579fe0c3 100755 --- a/qa/workunits/rados/test_health_warnings.sh +++ b/qa/workunits/rados/test_health_warnings.sh @@ -1,6 +1,6 @@ -#!/bin/bash -ex +#!/usr/bin/env bash -set -u +set -uex # number of osds = 10 crushtool -o crushmap --build --num_osds 10 host straw 2 rack straw 2 row straw 2 root straw 0 diff --git a/qa/workunits/rados/test_pool_access.sh b/qa/workunits/rados/test_pool_access.sh index 8597b7147c8..95c9768c10f 100755 --- a/qa/workunits/rados/test_pool_access.sh +++ b/qa/workunits/rados/test_pool_access.sh @@ -1,6 +1,6 @@ -#!/bin/bash -x +#!/usr/bin/env bash -set -e +set -ex expect_1() { diff --git a/qa/workunits/rados/test_rados_timeouts.sh b/qa/workunits/rados/test_rados_timeouts.sh index bb35d727e6d..f0660b3bdc3 100755 --- a/qa/workunits/rados/test_rados_timeouts.sh +++ b/qa/workunits/rados/test_rados_timeouts.sh @@ -1,4 +1,5 @@ -#!/bin/bash -x +#!/usr/bin/env bash +set -x delay_mon() { MSGTYPE=$1 diff --git a/qa/workunits/rados/test_rados_tool.sh b/qa/workunits/rados/test_rados_tool.sh index 6a3ebe0b22e..8b89112b347 100755 --- a/qa/workunits/rados/test_rados_tool.sh +++ b/qa/workunits/rados/test_rados_tool.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash die() { echo "$@" diff --git a/qa/workunits/rbd/concurrent.sh b/qa/workunits/rbd/concurrent.sh index e2fb7974724..abaad75f581 100755 --- a/qa/workunits/rbd/concurrent.sh +++ b/qa/workunits/rbd/concurrent.sh @@ -1,4 +1,4 @@ -#!/bin/bash -e +#!/usr/bin/env bash # Copyright (C) 2013 Inktank Storage, Inc. # @@ -47,7 +47,7 @@ ################################################################ -set -x +set -ex # Default flag values; RBD_CONCURRENT_ITER names are intended # to be used in yaml scripts to pass in alternate values, e.g.: diff --git a/qa/workunits/rbd/diff.sh b/qa/workunits/rbd/diff.sh index bab84e9521c..73a7290a18b 100755 --- a/qa/workunits/rbd/diff.sh +++ b/qa/workunits/rbd/diff.sh @@ -1,4 +1,5 @@ -#!/bin/bash -ex +#!/usr/bin/env bash +set -ex function cleanup() { rbd snap purge foo || : diff --git a/qa/workunits/rbd/diff_continuous.sh b/qa/workunits/rbd/diff_continuous.sh index 41e44125fde..d9cd8efdad0 100755 --- a/qa/workunits/rbd/diff_continuous.sh +++ b/qa/workunits/rbd/diff_continuous.sh @@ -1,4 +1,5 @@ -#!/bin/bash -ex +#!/usr/bin/env bash +set -ex max=20 size=1500 diff --git a/qa/workunits/rbd/huge-tickets.sh b/qa/workunits/rbd/huge-tickets.sh index 63a63846bd0..22853c07ad3 100755 --- a/qa/workunits/rbd/huge-tickets.sh +++ b/qa/workunits/rbd/huge-tickets.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # This is a test for http://tracker.ceph.com/issues/8979 and the fallout # from triaging it. #8979 itself was random crashes on corrupted memory diff --git a/qa/workunits/rbd/image_read.sh b/qa/workunits/rbd/image_read.sh index 907ce869bc4..779e315fec4 100755 --- a/qa/workunits/rbd/image_read.sh +++ b/qa/workunits/rbd/image_read.sh @@ -1,4 +1,4 @@ -#!/bin/bash -e +#!/usr/bin/env bash # Copyright (C) 2013 Inktank Storage, Inc. # @@ -41,6 +41,7 @@ # supercede these defaults. Such variables have names that begin # with "IMAGE_READ_", for e.g. use IMAGE_READ_PAGE_SIZE=65536 # to use 65536 as the page size. +set -e DEFAULT_VERBOSE=true DEFAULT_TEST_CLONES=true diff --git a/qa/workunits/rbd/journal.sh b/qa/workunits/rbd/journal.sh index 4d9b8063a60..f4813afc8be 100755 --- a/qa/workunits/rbd/journal.sh +++ b/qa/workunits/rbd/journal.sh @@ -1,4 +1,5 @@ -#!/bin/bash -e +#!/usr/bin/env bash +set -e . $(dirname $0)/../ceph-helpers.sh diff --git a/qa/workunits/rbd/kernel.sh b/qa/workunits/rbd/kernel.sh index 5fb6b9358a0..735396b3f31 100755 --- a/qa/workunits/rbd/kernel.sh +++ b/qa/workunits/rbd/kernel.sh @@ -1,4 +1,5 @@ -#!/bin/bash -ex +#!/usr/bin/env bash +set -ex CEPH_SECRET_FILE=${CEPH_SECRET_FILE:-} CEPH_ID=${CEPH_ID:-admin} diff --git a/qa/workunits/rbd/krbd_data_pool.sh b/qa/workunits/rbd/krbd_data_pool.sh index 7d728821339..7ecdf03d6b1 100755 --- a/qa/workunits/rbd/krbd_data_pool.sh +++ b/qa/workunits/rbd/krbd_data_pool.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -ex diff --git a/qa/workunits/rbd/krbd_exclusive_option.sh b/qa/workunits/rbd/krbd_exclusive_option.sh index 958aecf7325..dae18d83e68 100755 --- a/qa/workunits/rbd/krbd_exclusive_option.sh +++ b/qa/workunits/rbd/krbd_exclusive_option.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -ex diff --git a/qa/workunits/rbd/krbd_fallocate.sh b/qa/workunits/rbd/krbd_fallocate.sh index 05fc8a98c64..73f6036917e 100755 --- a/qa/workunits/rbd/krbd_fallocate.sh +++ b/qa/workunits/rbd/krbd_fallocate.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # This documents the state of things as of 4.12-rc4. # diff --git a/qa/workunits/rbd/krbd_stable_pages_required.sh b/qa/workunits/rbd/krbd_stable_pages_required.sh index a7c44c8f42f..46340a7d200 100755 --- a/qa/workunits/rbd/krbd_stable_pages_required.sh +++ b/qa/workunits/rbd/krbd_stable_pages_required.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -ex diff --git a/qa/workunits/rbd/map-unmap.sh b/qa/workunits/rbd/map-unmap.sh index ce7d20fca0a..99863849eb1 100755 --- a/qa/workunits/rbd/map-unmap.sh +++ b/qa/workunits/rbd/map-unmap.sh @@ -1,4 +1,5 @@ -#!/bin/bash -ex +#!/usr/bin/env bash +set -ex RUN_TIME=300 # approximate duration of run (seconds) diff --git a/qa/workunits/rbd/merge_diff.sh b/qa/workunits/rbd/merge_diff.sh index 0b6643dfa54..d0f26072eee 100755 --- a/qa/workunits/rbd/merge_diff.sh +++ b/qa/workunits/rbd/merge_diff.sh @@ -1,4 +1,5 @@ -#!/bin/bash -ex +#!/usr/bin/env bash +set -ex pool=rbd gen=$pool/gen diff --git a/qa/workunits/rbd/permissions.sh b/qa/workunits/rbd/permissions.sh index a435a67bb92..d5d2ee98e19 100755 --- a/qa/workunits/rbd/permissions.sh +++ b/qa/workunits/rbd/permissions.sh @@ -1,4 +1,5 @@ -#!/bin/bash -ex +#!/usr/bin/env bash +set -ex IMAGE_FEATURES="layering,exclusive-lock,object-map,fast-diff" diff --git a/qa/workunits/rbd/qemu_dynamic_features.sh b/qa/workunits/rbd/qemu_dynamic_features.sh index f237f663762..7045f5f09f5 100755 --- a/qa/workunits/rbd/qemu_dynamic_features.sh +++ b/qa/workunits/rbd/qemu_dynamic_features.sh @@ -1,4 +1,5 @@ -#!/bin/bash -x +#!/usr/bin/env bash +set -x if [[ -z "${IMAGE_NAME}" ]]; then echo image name must be provided diff --git a/qa/workunits/rbd/qemu_rebuild_object_map.sh b/qa/workunits/rbd/qemu_rebuild_object_map.sh index c064ee9b968..2647dcdcdec 100755 --- a/qa/workunits/rbd/qemu_rebuild_object_map.sh +++ b/qa/workunits/rbd/qemu_rebuild_object_map.sh @@ -1,4 +1,5 @@ -#!/bin/bash -ex +#!/usr/bin/env bash +set -ex if [[ -z "${IMAGE_NAME}" ]]; then echo image name must be provided diff --git a/qa/workunits/rbd/rbd-nbd.sh b/qa/workunits/rbd/rbd-nbd.sh index 333e3d77c8b..e7628762a2b 100755 --- a/qa/workunits/rbd/rbd-nbd.sh +++ b/qa/workunits/rbd/rbd-nbd.sh @@ -1,4 +1,5 @@ -#!/bin/bash -ex +#!/usr/bin/env bash +set -ex . $(dirname $0)/../ceph-helpers.sh diff --git a/qa/workunits/rbd/read-flags.sh b/qa/workunits/rbd/read-flags.sh index 7c24fded5ee..7d787ce6723 100755 --- a/qa/workunits/rbd/read-flags.sh +++ b/qa/workunits/rbd/read-flags.sh @@ -1,4 +1,5 @@ -#!/bin/bash -ex +#!/usr/bin/env bash +set -ex # create a snapshot, then export it and check that setting read flags works # by looking at --debug-ms output diff --git a/qa/workunits/rbd/run_devstack_tempest.sh b/qa/workunits/rbd/run_devstack_tempest.sh index 8e627ddf6c8..0cb7f72521d 100755 --- a/qa/workunits/rbd/run_devstack_tempest.sh +++ b/qa/workunits/rbd/run_devstack_tempest.sh @@ -1,4 +1,5 @@ -#!/bin/bash -ex +#!/usr/bin/env bash +set -ex STACK_BRANCH=stable/ocata @@ -87,7 +88,8 @@ enable_plugin devstack-plugin-ceph git://git.openstack.org/openstack/devstack-pl EOF cat< ${STACK_HOME_PATH}/start.sh -#!/bin/bash -ex +#!/usr/bin/env bash +set -ex cd ${STACK_OPT_PATH} git clone https://git.openstack.org/openstack-dev/devstack -b ${STACK_BRANCH} diff --git a/qa/workunits/rbd/test_admin_socket.sh b/qa/workunits/rbd/test_admin_socket.sh index ec8764c37dd..6f6e4ce3449 100755 --- a/qa/workunits/rbd/test_admin_socket.sh +++ b/qa/workunits/rbd/test_admin_socket.sh @@ -1,4 +1,5 @@ -#!/bin/bash -ex +#!/usr/bin/env bash +set -ex TMPDIR=/tmp/rbd_test_admin_socket$$ mkdir $TMPDIR diff --git a/qa/workunits/rbd/test_lock_fence.sh b/qa/workunits/rbd/test_lock_fence.sh index 7ecafd46356..1206da11aaf 100755 --- a/qa/workunits/rbd/test_lock_fence.sh +++ b/qa/workunits/rbd/test_lock_fence.sh @@ -1,5 +1,6 @@ -#!/bin/bash -x +#!/usr/bin/env bash # can't use -e because of background process +set -x IMAGE=rbdrw-image LOCKID=rbdrw diff --git a/qa/workunits/rename/all.sh b/qa/workunits/rename/all.sh index 8a493d04eb2..f97ff773f7b 100755 --- a/qa/workunits/rename/all.sh +++ b/qa/workunits/rename/all.sh @@ -1,4 +1,5 @@ -#!/bin/bash -ex +#!/usr/bin/env bash +set -ex dir=`dirname $0` diff --git a/qa/workunits/rgw/run-s3tests.sh b/qa/workunits/rgw/run-s3tests.sh index 31c091ede35..913dd6a052a 100755 --- a/qa/workunits/rgw/run-s3tests.sh +++ b/qa/workunits/rgw/run-s3tests.sh @@ -1,4 +1,5 @@ -#!/bin/bash -ex +#!/usr/bin/env bash +set -ex # run s3-tests from current directory. assume working # ceph environment (radosgw-admin in path) and rgw on localhost:8000 diff --git a/qa/workunits/suites/blogbench.sh b/qa/workunits/suites/blogbench.sh index 17c91c8c375..3596a368be9 100755 --- a/qa/workunits/suites/blogbench.sh +++ b/qa/workunits/suites/blogbench.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e echo "getting blogbench" diff --git a/qa/workunits/suites/bonnie.sh b/qa/workunits/suites/bonnie.sh index 698ba9c52ac..b60cc6a5e8e 100755 --- a/qa/workunits/suites/bonnie.sh +++ b/qa/workunits/suites/bonnie.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e diff --git a/qa/workunits/suites/cephfs_journal_tool_smoke.sh b/qa/workunits/suites/cephfs_journal_tool_smoke.sh index 60e91496511..525b6aa4631 100755 --- a/qa/workunits/suites/cephfs_journal_tool_smoke.sh +++ b/qa/workunits/suites/cephfs_journal_tool_smoke.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e set -x diff --git a/qa/workunits/suites/dbench-short.sh b/qa/workunits/suites/dbench-short.sh index 7297d835fb9..b0da0227576 100755 --- a/qa/workunits/suites/dbench-short.sh +++ b/qa/workunits/suites/dbench-short.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e diff --git a/qa/workunits/suites/dbench.sh b/qa/workunits/suites/dbench.sh index ea2be1cb905..32c893b453f 100755 --- a/qa/workunits/suites/dbench.sh +++ b/qa/workunits/suites/dbench.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e diff --git a/qa/workunits/suites/ffsb.sh b/qa/workunits/suites/ffsb.sh index 9ed66ab0063..da0ab8f09a0 100755 --- a/qa/workunits/suites/ffsb.sh +++ b/qa/workunits/suites/ffsb.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e diff --git a/qa/workunits/suites/fio.sh b/qa/workunits/suites/fio.sh index 04e06451333..ee69de81cb2 100755 --- a/qa/workunits/suites/fio.sh +++ b/qa/workunits/suites/fio.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -x diff --git a/qa/workunits/suites/fsstress.sh b/qa/workunits/suites/fsstress.sh index 92e123b99bb..0780a8274ff 100755 --- a/qa/workunits/suites/fsstress.sh +++ b/qa/workunits/suites/fsstress.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash BIN_PATH=${TESTDIR}/fsstress/ltp-full-20091231/testcases/kernel/fs/fsstress/fsstress diff --git a/qa/workunits/suites/iogen.sh b/qa/workunits/suites/iogen.sh index d159bde9719..4e06a6bf6a8 100755 --- a/qa/workunits/suites/iogen.sh +++ b/qa/workunits/suites/iogen.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e echo "getting iogen" diff --git a/qa/workunits/suites/iozone-sync.sh b/qa/workunits/suites/iozone-sync.sh index c0949523702..a37962d308e 100755 --- a/qa/workunits/suites/iozone-sync.sh +++ b/qa/workunits/suites/iozone-sync.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e diff --git a/qa/workunits/suites/iozone.sh b/qa/workunits/suites/iozone.sh index 4fcf8f1b673..7dc50cb0bd6 100755 --- a/qa/workunits/suites/iozone.sh +++ b/qa/workunits/suites/iozone.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -ex diff --git a/qa/workunits/suites/pjd.sh b/qa/workunits/suites/pjd.sh index e6df309ad5b..84049420b42 100755 --- a/qa/workunits/suites/pjd.sh +++ b/qa/workunits/suites/pjd.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e diff --git a/qa/workunits/suites/wac.sh b/qa/workunits/suites/wac.sh index 49b4f1464e1..a61148859a2 100755 --- a/qa/workunits/suites/wac.sh +++ b/qa/workunits/suites/wac.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -ex diff --git a/run-make-check.sh b/run-make-check.sh index b23672c4f0a..195282b08ce 100755 --- a/run-make-check.sh +++ b/run-make-check.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Ceph distributed storage system # diff --git a/src/ceph-detect-init/run-tox.sh b/src/ceph-detect-init/run-tox.sh index 9736dc40059..33553b0df57 100755 --- a/src/ceph-detect-init/run-tox.sh +++ b/src/ceph-detect-init/run-tox.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Copyright (C) 2015 SUSE LINUX GmbH # Copyright (C) 2016 diff --git a/src/ceph-disk/run-tox.sh b/src/ceph-disk/run-tox.sh index 76935b9e1f7..149dd6a2458 100755 --- a/src/ceph-disk/run-tox.sh +++ b/src/ceph-disk/run-tox.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Copyright (C) 2015 # diff --git a/src/ceph-disk/tests/ceph-disk.sh b/src/ceph-disk/tests/ceph-disk.sh index c89092ef403..49ee0302696 100755 --- a/src/ceph-disk/tests/ceph-disk.sh +++ b/src/ceph-disk/tests/ceph-disk.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Copyright (C) 2014 Cloudwatt # Copyright (C) 2014, 2015, 2016, 2017 Red Hat @@ -91,7 +91,7 @@ function command_fixture() { [ "$fpath" = `readlink -f $CEPH_BIN/$command` ] || [ "$fpath" = `readlink -f $(pwd)/$command` ] || return 1 cat > $dir/$command <&2 diff --git a/src/script/smr_benchmark/linearCopy.sh b/src/script/smr_benchmark/linearCopy.sh index 30a6044a86e..416a7e7423c 100755 --- a/src/script/smr_benchmark/linearCopy.sh +++ b/src/script/smr_benchmark/linearCopy.sh @@ -1,4 +1,4 @@ -#! /bin/bash +#!/usr/bin/env bash # copy a linear file from srcFile to destination disk in a loop until writeSize MBs is written # destinationDisk is a SMR Host Aware Disk eg. /dev/sdb diff --git a/src/script/smr_benchmark/linearSMRCopy.sh b/src/script/smr_benchmark/linearSMRCopy.sh index f35437c5d7c..1ff2695c6ce 100755 --- a/src/script/smr_benchmark/linearSMRCopy.sh +++ b/src/script/smr_benchmark/linearSMRCopy.sh @@ -1,4 +1,4 @@ -#! /bin/bash +#! /usr/bin/env bash # copy a linear file from srcFile to destination SMRDisk in a loop until writeSize MBs is written # SMRDisk is the SMR Host Aware / Host Managed Disk eg. /dev/sdb diff --git a/src/test/client/iozone.sh b/src/test/client/iozone.sh index ee231443fa9..31e955da756 100755 --- a/src/test/client/iozone.sh +++ b/src/test/client/iozone.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e name=`echo $0 | sed 's/\//_/g'` @@ -9,4 +9,4 @@ iozone -c -e -s 1024M -r 16K -t 1 -F f1 -i 0 -i 1 iozone -c -e -s 1024M -r 1M -t 1 -F f2 -i 0 -i 1 iozone -c -e -s 10240M -r 1M -t 1 -F f3 -i 0 -i 1 -cd .. \ No newline at end of file +cd .. diff --git a/src/test/client/kernel_untar_build.sh b/src/test/client/kernel_untar_build.sh index 4324a72b690..1e9409202d5 100755 --- a/src/test/client/kernel_untar_build.sh +++ b/src/test/client/kernel_untar_build.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e name=`echo $0 | sed 's/\//_/g'` diff --git a/src/test/crush/crush_weights.sh b/src/test/crush/crush_weights.sh index 6ae1900612d..b089c728bb9 100755 --- a/src/test/crush/crush_weights.sh +++ b/src/test/crush/crush_weights.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash source $(dirname $0)/../detect-build-env-vars.sh diff --git a/src/test/detect-build-env-vars.sh b/src/test/detect-build-env-vars.sh index 6ddbd431a10..9118de5f37e 100644 --- a/src/test/detect-build-env-vars.sh +++ b/src/test/detect-build-env-vars.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash if [ -n "$CEPH_BUILD_DIR" ] && [ -n "$CEPH_ROOT" ] && [ -n "$CEPH_BIN" ] && [ -n "$CEPH_LIB" ]; then echo "Enivronment Variables Already Set" diff --git a/src/test/docker-test-helper.sh b/src/test/docker-test-helper.sh index f66911d70d1..d36a3b760d9 100755 --- a/src/test/docker-test-helper.sh +++ b/src/test/docker-test-helper.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Copyright (C) 2014, 2015 Red Hat # diff --git a/src/test/docker-test.sh b/src/test/docker-test.sh index d0319fe84db..6d0111367b1 100755 --- a/src/test/docker-test.sh +++ b/src/test/docker-test.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Copyright (C) 2014 Red Hat # diff --git a/src/test/encoding/check-generated.sh b/src/test/encoding/check-generated.sh index f94c1fd64da..d49186cd6d2 100755 --- a/src/test/encoding/check-generated.sh +++ b/src/test/encoding/check-generated.sh @@ -1,12 +1,11 @@ -#!/bin/bash -e +#!/usr/bin/env bash +set -e source $(dirname $0)/../detect-build-env-vars.sh source $CEPH_ROOT/qa/standalone/ceph-helpers.sh dir=$1 -set -e - tmp1=`mktemp /tmp/typ-XXXXXXXXX` tmp2=`mktemp /tmp/typ-XXXXXXXXX` tmp3=`mktemp /tmp/typ-XXXXXXXXX` diff --git a/src/test/encoding/generate-corpus-objects.sh b/src/test/encoding/generate-corpus-objects.sh index 6f84181ecf4..559ac524d70 100755 --- a/src/test/encoding/generate-corpus-objects.sh +++ b/src/test/encoding/generate-corpus-objects.sh @@ -1,4 +1,5 @@ -#!/bin/bash -ex +#!/usr/bin/env bash +set -ex BDIR=`pwd` diff --git a/src/test/encoding/readable.sh b/src/test/encoding/readable.sh index ee0bd26223e..462117ec1e0 100755 --- a/src/test/encoding/readable.sh +++ b/src/test/encoding/readable.sh @@ -1,4 +1,5 @@ -#!/bin/bash -e +#!/usr/bin/env bash +set -e source $(dirname $0)/../detect-build-env-vars.sh @@ -6,8 +7,6 @@ source $(dirname $0)/../detect-build-env-vars.sh dir=$CEPH_ROOT/ceph-object-corpus -set -e - failed=0 numtests=0 pids="" diff --git a/src/test/mgr/mgr-dashboard-smoke.sh b/src/test/mgr/mgr-dashboard-smoke.sh index 353c4d45a03..91e9cf91353 100755 --- a/src/test/mgr/mgr-dashboard-smoke.sh +++ b/src/test/mgr/mgr-dashboard-smoke.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Copyright (C) 2014,2015,2017 Red Hat # diff --git a/src/test/objectstore/run_seed_to.sh b/src/test/objectstore/run_seed_to.sh index d5bb671138c..8d47e8fb316 100755 --- a/src/test/objectstore/run_seed_to.sh +++ b/src/test/objectstore/run_seed_to.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # vim: ts=8 sw=2 smarttab # # run_seed_to.sh - Run ceph_test_filestore_idempotent_sequence up until an diff --git a/src/test/rgw/test-rgw-call.sh b/src/test/rgw/test-rgw-call.sh index 39a3f8fd001..49399ebc32a 100755 --- a/src/test/rgw/test-rgw-call.sh +++ b/src/test/rgw/test-rgw-call.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . "`dirname $0`/test-rgw-common.sh" . "`dirname $0`/test-rgw-meta-sync.sh" diff --git a/src/test/rgw/test-rgw-common.sh b/src/test/rgw/test-rgw-common.sh index 20f2e0da05c..0f8918f213f 100644 --- a/src/test/rgw/test-rgw-common.sh +++ b/src/test/rgw/test-rgw-common.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash rgw_flags="--debug-rgw=20 --debug-ms=1" diff --git a/src/test/rgw/test-rgw-meta-sync.sh b/src/test/rgw/test-rgw-meta-sync.sh index e510c6285b5..18f425298e2 100755 --- a/src/test/rgw/test-rgw-meta-sync.sh +++ b/src/test/rgw/test-rgw-meta-sync.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . "`dirname $0`/test-rgw-common.sh" diff --git a/src/test/rgw/test-rgw-multisite.sh b/src/test/rgw/test-rgw-multisite.sh index 4362cda9fe7..94beef95508 100755 --- a/src/test/rgw/test-rgw-multisite.sh +++ b/src/test/rgw/test-rgw-multisite.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash [ $# -lt 1 ] && echo "usage: $0 " && exit 1 diff --git a/src/test/run-rbd-tests b/src/test/run-rbd-tests index 3bd27ab9220..21913bfc513 100755 --- a/src/test/run-rbd-tests +++ b/src/test/run-rbd-tests @@ -1,4 +1,5 @@ -#!/bin/bash -ex +#!/usr/bin/env bash +set -ex # this should be run from the src directory in the ceph.git diff --git a/src/test/run-rbd-unit-tests.sh b/src/test/run-rbd-unit-tests.sh index a1ae9442382..7c856d60984 100755 --- a/src/test/run-rbd-unit-tests.sh +++ b/src/test/run-rbd-unit-tests.sh @@ -1,4 +1,5 @@ -#!/bin/bash -ex +#!/usr/bin/env bash +set -ex # this should be run from the src directory in the ceph.git diff --git a/src/test/run-rbd-valgrind-unit-tests.sh b/src/test/run-rbd-valgrind-unit-tests.sh index fb5da0d876a..3765b7e690d 100755 --- a/src/test/run-rbd-valgrind-unit-tests.sh +++ b/src/test/run-rbd-valgrind-unit-tests.sh @@ -1,4 +1,5 @@ -#!/bin/bash -ex +#!/usr/bin/env bash +set -ex # this should be run from the src directory in the ceph.git (when built with # automake) or cmake build directory diff --git a/src/test/system/rerun.sh b/src/test/system/rerun.sh index df6cbf56bef..5d7d4635bee 100755 --- a/src/test/system/rerun.sh +++ b/src/test/system/rerun.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash [ -z $ITERATIONS ] && ITERATIONS=10 diff --git a/src/test/test_common.sh b/src/test/test_common.sh index 5ab89f1b93f..1fea1f9fdf9 100755 --- a/src/test/test_common.sh +++ b/src/test/test_common.sh @@ -1,4 +1,5 @@ -#!/bin/bash -x +#!/usr/bin/env bash +set -x # # test_common.sh diff --git a/src/test/test_crush_bucket.sh b/src/test/test_crush_bucket.sh index 837fd0a54b2..2a297f9f3c3 100755 --- a/src/test/test_crush_bucket.sh +++ b/src/test/test_crush_bucket.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash #Generic test_crush_bucket test diff --git a/src/test/test_csyn.sh b/src/test/test_csyn.sh index 98003aaf6d0..04efcb2ac90 100644 --- a/src/test/test_csyn.sh +++ b/src/test/test_csyn.sh @@ -1,4 +1,5 @@ -#!/bin/bash -x +#!/usr/bin/env bash +set -x # # Runs the synthetic client diff --git a/src/test/test_lost.sh b/src/test/test_lost.sh index 4a976c03c39..43959bb887d 100755 --- a/src/test/test_lost.sh +++ b/src/test/test_lost.sh @@ -1,4 +1,5 @@ -#!/bin/bash -x +#!/usr/bin/env bash +set -x # # Test the lost object logic diff --git a/src/test/test_pidfile.sh b/src/test/test_pidfile.sh index b76fa9b64a6..424e274866d 100755 --- a/src/test/test_pidfile.sh +++ b/src/test/test_pidfile.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # test pidfile here diff --git a/src/test/test_pool_create.sh b/src/test/test_pool_create.sh index 613e205f813..54abf157299 100755 --- a/src/test/test_pool_create.sh +++ b/src/test/test_pool_create.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash #Generic create pool use crush rule test diff --git a/src/test/test_pools.sh b/src/test/test_pools.sh index 68143508c15..167becb25df 100755 --- a/src/test/test_pools.sh +++ b/src/test/test_pools.sh @@ -1,4 +1,5 @@ -#!/bin/bash -x +#!/usr/bin/env bash +set -x # # Test pools diff --git a/src/test/test_rw.sh b/src/test/test_rw.sh index 37e8ebd9928..cb7dc776756 100755 --- a/src/test/test_rw.sh +++ b/src/test/test_rw.sh @@ -1,4 +1,5 @@ -#!/bin/bash -x +#!/usr/bin/env bash +set -x # # Generic read/write from object store test diff --git a/src/test/test_split.sh b/src/test/test_split.sh index 4fdedd5cf68..396801ebd29 100755 --- a/src/test/test_split.sh +++ b/src/test/test_split.sh @@ -1,4 +1,5 @@ -#!/bin/bash -x +#!/usr/bin/env bash +set -x # # Add some objects to the data PGs, and then test splitting those PGs diff --git a/src/test/test_subman.sh b/src/test/test_subman.sh index db4ee9c2534..459a1804124 100755 --- a/src/test/test_subman.sh +++ b/src/test/test_subman.sh @@ -1,4 +1,5 @@ -#!/bin/bash -e +#!/usr/bin/env bash +set -e source $(dirname $0)/detect-build-env-vars.sh diff --git a/src/test/test_unfound.sh b/src/test/test_unfound.sh index 35e8483fea0..948a21e241b 100755 --- a/src/test/test_unfound.sh +++ b/src/test/test_unfound.sh @@ -1,4 +1,5 @@ -#!/bin/bash -x +#!/usr/bin/env bash +set -x # # Creates some unfound objects and then tests finding them. diff --git a/src/test/vstart_wrapper.sh b/src/test/vstart_wrapper.sh index 235a81fb467..7bd3dbe338d 100755 --- a/src/test/vstart_wrapper.sh +++ b/src/test/vstart_wrapper.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Copyright (C) 2013 Cloudwatt # Copyright (C) 2015 Red Hat diff --git a/src/tools/ceph-lazy/ceph-lazy b/src/tools/ceph-lazy/ceph-lazy index a0b808283f7..b3caafbbda1 100755 --- a/src/tools/ceph-lazy/ceph-lazy +++ b/src/tools/ceph-lazy/ceph-lazy @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # ceph-lazy : Be efficient, be lazy ! # diff --git a/src/tools/ceph-monstore-update-crush.sh b/src/tools/ceph-monstore-update-crush.sh index e2fd73cf302..5adfacdc21b 100755 --- a/src/tools/ceph-monstore-update-crush.sh +++ b/src/tools/ceph-monstore-update-crush.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Copyright (C) 2015 Red Hat # diff --git a/src/tools/rbd_recover_tool/common_h b/src/tools/rbd_recover_tool/common_h index 4a0d3fc9da2..187bcd08058 100644 --- a/src/tools/rbd_recover_tool/common_h +++ b/src/tools/rbd_recover_tool/common_h @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # file: common_h # # Copyright (C) 2015 Ubuntu Kylin diff --git a/src/tools/rbd_recover_tool/database_h b/src/tools/rbd_recover_tool/database_h index c8e97598b68..d72c6be707e 100644 --- a/src/tools/rbd_recover_tool/database_h +++ b/src/tools/rbd_recover_tool/database_h @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # file: database_h # # Copyright (C) 2015 Ubuntu Kylin diff --git a/src/tools/rbd_recover_tool/epoch_h b/src/tools/rbd_recover_tool/epoch_h index edfaeafd828..e268eafa737 100644 --- a/src/tools/rbd_recover_tool/epoch_h +++ b/src/tools/rbd_recover_tool/epoch_h @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # file: epoch_h # # Copyright (C) 2015 Ubuntu Kylin diff --git a/src/tools/rbd_recover_tool/metadata_h b/src/tools/rbd_recover_tool/metadata_h index 02969621d9c..55c21d2573a 100644 --- a/src/tools/rbd_recover_tool/metadata_h +++ b/src/tools/rbd_recover_tool/metadata_h @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # file: metadata_h # # Copyright (C) 2015 Ubuntu Kylin diff --git a/src/tools/rbd_recover_tool/osd_job b/src/tools/rbd_recover_tool/osd_job index f3e2ff34491..b4b80be8ab6 100755 --- a/src/tools/rbd_recover_tool/osd_job +++ b/src/tools/rbd_recover_tool/osd_job @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # file: osd_job # # Copyright (C) 2015 Ubuntu Kylin diff --git a/src/tools/rbd_recover_tool/rbd-recover-tool b/src/tools/rbd_recover_tool/rbd-recover-tool index b24992d6c9c..70f4e7c1dc6 100755 --- a/src/tools/rbd_recover_tool/rbd-recover-tool +++ b/src/tools/rbd_recover_tool/rbd-recover-tool @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # file: rbd-recover-tool # # Copyright (C) 2015 Ubuntu Kylin diff --git a/src/tools/rbd_recover_tool/test_rbd_recover_tool.sh b/src/tools/rbd_recover_tool/test_rbd_recover_tool.sh index 80b0a8cd588..876b47b906f 100755 --- a/src/tools/rbd_recover_tool/test_rbd_recover_tool.sh +++ b/src/tools/rbd_recover_tool/test_rbd_recover_tool.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Copyright (C) 2015 Ubuntu Kylin # diff --git a/src/tools/setup-virtualenv.sh b/src/tools/setup-virtualenv.sh index c7680b9558b..a99c5088a56 100755 --- a/src/tools/setup-virtualenv.sh +++ b/src/tools/setup-virtualenv.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Copyright (C) 2016 # diff --git a/src/vstart.sh b/src/vstart.sh index 88c35d5e96f..649bcb00240 100755 --- a/src/vstart.sh +++ b/src/vstart.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # abort on failure set -e diff --git a/systemd/ceph b/systemd/ceph index 6a692716887..746234b1736 100644 --- a/systemd/ceph +++ b/systemd/ceph @@ -1,4 +1,4 @@ -#! /bin/bash +#! /usr/bin/env bash ### BEGIN INIT INFO # Provides: ceph ceph-mon ceph-osd