From f9426daca50d705d05b625399f41ae82272b8dbe Mon Sep 17 00:00:00 2001 From: Bas Couwenberg Date: Fri, 29 Sep 2017 09:34:25 +0200 Subject: [PATCH] shellcheck fixes for pdns-recursor plugins. --- plugins/pdns/pdns_rec_answers | 12 ++++++------ plugins/pdns/pdns_rec_cache | 8 ++++---- plugins/pdns/pdns_rec_cache_size | 4 ++-- plugins/pdns/pdns_rec_concurrent | 2 +- plugins/pdns/pdns_rec_issues | 10 +++++----- plugins/pdns/pdns_rec_outqueries | 4 ++-- plugins/pdns/pdns_rec_querylatency | 2 +- plugins/pdns/pdns_rec_questions | 4 ++-- plugins/pdns/pdns_rec_throttle | 2 +- plugins/pdns/pdns_rec_unauth | 6 +++--- 10 files changed, 27 insertions(+), 27 deletions(-) diff --git a/plugins/pdns/pdns_rec_answers b/plugins/pdns/pdns_rec_answers index a78de5de..d3316234 100755 --- a/plugins/pdns/pdns_rec_answers +++ b/plugins/pdns/pdns_rec_answers @@ -65,11 +65,11 @@ if [ "$1" = "config" ]; then exit 0 fi -echo a.value `rec_control get answers0-1` -echo b.value `rec_control get answers1-10` -echo c.value `rec_control get answers10-100` -echo d.value `rec_control get answers100-1000` -echo e.value `rec_control get answers-slow` -echo f.value `rec_control get outgoing-timeouts` +echo a.value "$(rec_control get answers0-1)" +echo b.value "$(rec_control get answers1-10)" +echo c.value "$(rec_control get answers10-100)" +echo d.value "$(rec_control get answers100-1000)" +echo e.value "$(rec_control get answers-slow)" +echo f.value "$(rec_control get outgoing-timeouts)" exit 0 diff --git a/plugins/pdns/pdns_rec_cache b/plugins/pdns/pdns_rec_cache index e72d1ed0..93938300 100755 --- a/plugins/pdns/pdns_rec_cache +++ b/plugins/pdns/pdns_rec_cache @@ -19,7 +19,7 @@ if [ "$1" = "autoconf" ]; then fi fi -RESENDS=`rec_control get cache-resends` +RESENDS="$(rec_control get cache-resends)" ISRESENDS="" [ "$RESENDS" != "UNKNOWN" ] && ISRESENDS="resends" @@ -53,8 +53,8 @@ if [ "$1" = "config" ]; then exit 0 fi -echo hits.value `rec_control get cache-hits` -echo misses.value `rec_control get cache-misses` -[ "$RESENDS" != "UNKNOWN" ] && echo resends.value `rec_control get cache-resends` +echo hits.value "$(rec_control get cache-hits)" +echo misses.value "$(rec_control get cache-misses)" +[ "$RESENDS" != "UNKNOWN" ] && echo resends.value "$(rec_control get cache-resends)" exit 0 diff --git a/plugins/pdns/pdns_rec_cache_size b/plugins/pdns/pdns_rec_cache_size index 6e855253..e1b4413d 100755 --- a/plugins/pdns/pdns_rec_cache_size +++ b/plugins/pdns/pdns_rec_cache_size @@ -39,7 +39,7 @@ if [ "$1" = "config" ]; then exit 0 fi -echo entries.value `rec_control get cache-entries` -echo negative.value `rec_control get negcache-entries` +echo entries.value "$(rec_control get cache-entries)" +echo negative.value "$(rec_control get negcache-entries)" exit 0 diff --git a/plugins/pdns/pdns_rec_concurrent b/plugins/pdns/pdns_rec_concurrent index bb3ac11e..8c4c7063 100755 --- a/plugins/pdns/pdns_rec_concurrent +++ b/plugins/pdns/pdns_rec_concurrent @@ -34,6 +34,6 @@ if [ "$1" = "config" ]; then exit 0 fi -echo concurrent.value `rec_control get concurrent-queries` +echo concurrent.value "$(rec_control get concurrent-queries)" exit 0 diff --git a/plugins/pdns/pdns_rec_issues b/plugins/pdns/pdns_rec_issues index d605113f..87b09a9c 100755 --- a/plugins/pdns/pdns_rec_issues +++ b/plugins/pdns/pdns_rec_issues @@ -59,10 +59,10 @@ if [ "$1" = "config" ]; then exit 0 fi -echo spoofs.value `rec_control get spoof-prevents` -echo resource.value `rec_control get resource-limits` -echo client.value `rec_control get client-parse-errors` -echo server.value `rec_control get server-parse-errors` -echo overflow.value `rec_control get tcp-client-overflow` +echo spoofs.value "$(rec_control get spoof-prevents)" +echo resource.value "$(rec_control get resource-limits)" +echo client.value "$(rec_control get client-parse-errors)" +echo server.value "$(rec_control get server-parse-errors)" +echo overflow.value "$(rec_control get tcp-client-overflow)" exit 0 diff --git a/plugins/pdns/pdns_rec_outqueries b/plugins/pdns/pdns_rec_outqueries index 524d0056..a96f5c39 100755 --- a/plugins/pdns/pdns_rec_outqueries +++ b/plugins/pdns/pdns_rec_outqueries @@ -41,7 +41,7 @@ if [ "$1" = "config" ]; then exit 0 fi -echo all.value `rec_control get all-outqueries` -echo tcp.value `rec_control get tcp-outqueries` +echo all.value "$(rec_control get all-outqueries)" +echo tcp.value "$(rec_control get tcp-outqueries)" exit 0 diff --git a/plugins/pdns/pdns_rec_querylatency b/plugins/pdns/pdns_rec_querylatency index 20b63973..d019c84a 100755 --- a/plugins/pdns/pdns_rec_querylatency +++ b/plugins/pdns/pdns_rec_querylatency @@ -34,6 +34,6 @@ if [ "$1" = "config" ]; then exit 0 fi -echo latency.value `rec_control get qa-latency` +echo latency.value "$(rec_control get qa-latency)" exit 0 diff --git a/plugins/pdns/pdns_rec_questions b/plugins/pdns/pdns_rec_questions index 2a84ef63..4bbf24be 100755 --- a/plugins/pdns/pdns_rec_questions +++ b/plugins/pdns/pdns_rec_questions @@ -41,7 +41,7 @@ if [ "$1" = "config" ]; then exit 0 fi -echo all.value `rec_control get questions` -echo tcp.value `rec_control get tcp-questions` +echo all.value "$(rec_control get questions)" +echo tcp.value "$(rec_control get tcp-questions)" exit 0 diff --git a/plugins/pdns/pdns_rec_throttle b/plugins/pdns/pdns_rec_throttle index d82ffc1f..9980eafd 100755 --- a/plugins/pdns/pdns_rec_throttle +++ b/plugins/pdns/pdns_rec_throttle @@ -34,6 +34,6 @@ if [ "$1" = "config" ]; then exit 0 fi -echo throttled.value `rec_control get throttled-out` +echo throttled.value "$(rec_control get throttled-out)" exit 0 diff --git a/plugins/pdns/pdns_rec_unauth b/plugins/pdns/pdns_rec_unauth index 2f3df151..6cfc59c5 100755 --- a/plugins/pdns/pdns_rec_unauth +++ b/plugins/pdns/pdns_rec_unauth @@ -47,8 +47,8 @@ if [ "$1" = "config" ]; then exit 0 fi -echo tcp.value `rec_control get unauthorized-tcp` -echo udp.value `rec_control get unauthorized-udp` -echo unexpected.value `rec_control get unexpected-packets` +echo tcp.value "$(rec_control get unauthorized-tcp)" +echo udp.value "$(rec_control get unauthorized-udp)" +echo unexpected.value "$(rec_control get unexpected-packets)" exit 0