From: Peter van Dijk Date: Fri, 13 Dec 2013 11:26:17 +0000 (+0100) Subject: make our bash invocations more portable X-Git-Tag: rec-3.6.0-rc1~296 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cf4d037d4f5cca8b3386f53544247284f51ae5c2;p=thirdparty%2Fpdns.git make our bash invocations more portable --- diff --git a/build-scripts/set-version-auth b/build-scripts/set-version-auth index 41800fc462..e21e2ae04a 100755 --- a/build-scripts/set-version-auth +++ b/build-scripts/set-version-auth @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash VERSION=$1 DEB_VERSION=$2 RPM_VERSION=$3 diff --git a/build-scripts/set-version-recursor b/build-scripts/set-version-recursor index 91be4b78ed..36cb744d46 100755 --- a/build-scripts/set-version-recursor +++ b/build-scripts/set-version-recursor @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash VERSION=$1 DEB_VERSION=$2 RPM_VERSION=$3 diff --git a/pdns/dnssec-scripts/clone-zone b/pdns/dnssec-scripts/clone-zone index 6acf5406f0..db95e0d4ed 100755 --- a/pdns/dnssec-scripts/clone-zone +++ b/pdns/dnssec-scripts/clone-zone @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash TIMERANGE=$(drill -D @127.0.0.1 -p 5300 powerdnssec.org -t soa | grep RRSIG | head -1 | awk '{printf "-e %s -i %s", $9, $10}') diff --git a/pdns/dnssec-scripts/gencmpquestions b/pdns/dnssec-scripts/gencmpquestions index aaae2f46db..3d4dd367ac 100755 --- a/pdns/dnssec-scripts/gencmpquestions +++ b/pdns/dnssec-scripts/gencmpquestions @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash PDNSPORT=5300 CMPPORT=53 diff --git a/pdns/dnssec-scripts/gendiff b/pdns/dnssec-scripts/gendiff index 8fab684f46..3089c4cafa 100755 --- a/pdns/dnssec-scripts/gendiff +++ b/pdns/dnssec-scripts/gendiff @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash for a in output.*.pdns do diff --git a/pdns/tools/rrd/makegraphs b/pdns/tools/rrd/makegraphs index 27f0a87fb2..a0f66998c2 100755 --- a/pdns/tools/rrd/makegraphs +++ b/pdns/tools/rrd/makegraphs @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash WWWPREFIX=. WSIZE=800 HSIZE=250 diff --git a/regression-tests.nobackend/edns-packet-cache/command b/regression-tests.nobackend/edns-packet-cache/command index eaba0ecb48..1c4414f162 100755 --- a/regression-tests.nobackend/edns-packet-cache/command +++ b/regression-tests.nobackend/edns-packet-cache/command @@ -1,4 +1,6 @@ -#!/bin/bash -ex +#!/usr/bin/env bash +set -e +set -x bindwait () { diff --git a/regression-tests.nobackend/pdnsconfdist/command b/regression-tests.nobackend/pdnsconfdist/command index 36e556838f..a77beb5327 100755 --- a/regression-tests.nobackend/pdnsconfdist/command +++ b/regression-tests.nobackend/pdnsconfdist/command @@ -1,3 +1,3 @@ -#!/bin/bash +#!/usr/bin/env bash diff -u ../pdns/pdns.conf-dist <(../pdns/pdns_server --config) diff --git a/regression-tests.nobackend/tinydns-data-check/command b/regression-tests.nobackend/tinydns-data-check/command index 21b1a94a8e..5f8b095456 100755 --- a/regression-tests.nobackend/tinydns-data-check/command +++ b/regression-tests.nobackend/tinydns-data-check/command @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash for zone in `cat ../regression-tests/named.conf | grep zone | cut -f 2 -d \"` do diff --git a/regression-tests/00dnssec-grabkeys/command b/regression-tests/00dnssec-grabkeys/command index a291ee1956..304d490424 100755 --- a/regression-tests/00dnssec-grabkeys/command +++ b/regression-tests/00dnssec-grabkeys/command @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash rm -f trustedkeys rm -f unbound-host.conf diff --git a/regression-tests/1dyndns-update-nsec3params/command b/regression-tests/1dyndns-update-nsec3params/command index ee43c0e8f7..9c0e22ac96 100755 --- a/regression-tests/1dyndns-update-nsec3params/command +++ b/regression-tests/1dyndns-update-nsec3params/command @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash NSEC3=`cleandig test.dyndns NSEC3PARAM hidesoadetails dnssec` echo $NSEC3 diff --git a/regression-tests/5dyndns-restore-zone/command b/regression-tests/5dyndns-restore-zone/command index 9d1f6a3100..da8a534861 100755 --- a/regression-tests/5dyndns-restore-zone/command +++ b/regression-tests/5dyndns-restore-zone/command @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash [ -z "$GMYSQLDB" ] && GMYSQLDB=pdnstest [ -z "$GMYSQLUSER" ] && GMYSQLUSER=root diff --git a/regression-tests/bind-add-zone/command b/regression-tests/bind-add-zone/command index eede9aea5c..46f41b610e 100755 --- a/regression-tests/bind-add-zone/command +++ b/regression-tests/bind-add-zone/command @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash if [ "${context:0:4}" != "bind" ]; then exit 0 diff --git a/regression-tests/bind-add-zone/stress/addzones.sh b/regression-tests/bind-add-zone/stress/addzones.sh index 4160c51620..b3aa8fc9d4 100755 --- a/regression-tests/bind-add-zone/stress/addzones.sh +++ b/regression-tests/bind-add-zone/stress/addzones.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash for f in $(seq 1 $AMOUNT); do f=addzone$f.com diff --git a/regression-tests/bind-add-zone/stress/createzones.sh b/regression-tests/bind-add-zone/stress/createzones.sh index ec5bf5283d..d850dcca9f 100755 --- a/regression-tests/bind-add-zone/stress/createzones.sh +++ b/regression-tests/bind-add-zone/stress/createzones.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash for f in $(seq 1 $AMOUNT); do f=addzone$f.com diff --git a/regression-tests/bind-add-zone/stress/dnsperf.sh b/regression-tests/bind-add-zone/stress/dnsperf.sh index 03b4dd14f0..3ad293a59c 100755 --- a/regression-tests/bind-add-zone/stress/dnsperf.sh +++ b/regression-tests/bind-add-zone/stress/dnsperf.sh @@ -1,3 +1,3 @@ -#!/bin/bash +#!/usr/bin/env bash $DNSPERF -p $port -s localhost -d ./add-zone/stress/tmp/list -c 10 -n 100 -S 10 diff --git a/regression-tests/bind-add-zone/stress/run.sh b/regression-tests/bind-add-zone/stress/run.sh index 7c6140d305..b05030987a 100755 --- a/regression-tests/bind-add-zone/stress/run.sh +++ b/regression-tests/bind-add-zone/stress/run.sh @@ -1,4 +1,6 @@ -#!/bin/bash -ex +#!/usr/bin/env bash +set -e +set -x PDNS=../pdns/pdns_server AMOUNT=${1:-1000} diff --git a/regression-tests/mysqldiff b/regression-tests/mysqldiff index 94a57d9bd0..ce8278a4ab 100755 --- a/regression-tests/mysqldiff +++ b/regression-tests/mysqldiff @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash [ -z "$GMYSQLDB" ] && GMYSQLDB=pdnstest [ -z "$GMYSQLUSER" ] && GMYSQLUSER=root diff --git a/regression-tests/runtests b/regression-tests/runtests index 6a660598fe..193c3b46f9 100755 --- a/regression-tests/runtests +++ b/regression-tests/runtests @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash PATH=.:$PATH MAKE=${MAKE:-make} diff --git a/regression-tests/start-test-stop b/regression-tests/start-test-stop index c4986c6664..b40bc3dd46 100755 --- a/regression-tests/start-test-stop +++ b/regression-tests/start-test-stop @@ -1,4 +1,6 @@ -#!/bin/bash -ex +#!/usr/bin/env bash +set -e +set -x PDNS=${PDNS:-../pdns/pdns_server} PDNS2=${PDNS2:-../pdns/pdns_server} diff --git a/regression-tests/verify-dnssec-zone/command b/regression-tests/verify-dnssec-zone/command index da52b1e544..16adf1735a 100755 --- a/regression-tests/verify-dnssec-zone/command +++ b/regression-tests/verify-dnssec-zone/command @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash for zone in $(grep zone named.conf | cut -f2 -d\" | grep -v '^\(example.com\|nztest.com\)$') do TFILE=$(mktemp)