From fe249830ed27315c7943838d60b650a8e57b62f0 Mon Sep 17 00:00:00 2001 From: Eric Renfro Date: Sat, 19 Aug 2017 19:18:24 -0400 Subject: [PATCH] Further bugfixes fixed from shellcheck --- src/plugins/update-ipv4 | 7 ++----- src/plugins/update-ipv6 | 6 ++---- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/src/plugins/update-ipv4 b/src/plugins/update-ipv4 index 46be3ea..197cb4a 100644 --- a/src/plugins/update-ipv4 +++ b/src/plugins/update-ipv4 @@ -1,6 +1,5 @@ plugin_name=$1 check_record=$2 - updateerrors=0 if [[ -z "$check_record" ]]; then @@ -9,14 +8,12 @@ if [[ -z "$check_record" ]]; then else if [[ -r "$check_record" ]]; then for d in $(getRecords "$check_record"); do - check-update 4 "$check_record" - if [[ $? -ne 0 ]]; then + if check-update 4 "$d"; then let updateerrors++ fi done else - check-update 4 "$check_record" - if [[ $? -ne 0 ]]; then + if check-update 4 "$check_record"; then let updateerrors++ fi fi diff --git a/src/plugins/update-ipv6 b/src/plugins/update-ipv6 index bab07ed..fecd57e 100644 --- a/src/plugins/update-ipv6 +++ b/src/plugins/update-ipv6 @@ -8,14 +8,12 @@ if [[ -z "$check_record" ]]; then else if [[ -r "$check_record" ]]; then for d in $(getRecords "$check_record"); do - check-update 6 "$check_record" - if [[ $? -ne 0 ]]; then + if ! check-update 6 "$check_record"; then let updateerrors++ fi done else - check-update 6 "$check_record" - if [[ $? -ne 0 ]]; then + if ! check-update 6 "$check_record"; then let updateerrors++ fi fi