From f9f5c578f744cd157c138fca09ff84616cf805b6 Mon Sep 17 00:00:00 2001 From: Dennis Camera Date: Mon, 11 Jan 2021 12:16:09 +0100 Subject: [PATCH] [type/__dma*] Fix shellcheck errors --- type/__dma/gencode-remote | 2 +- type/__dma/manifest | 2 +- type/__dma_auth/explorer/state | 2 +- type/__dma_auth/gencode-remote | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/type/__dma/gencode-remote b/type/__dma/gencode-remote index fa676d4..580b22e 100755 --- a/type/__dma/gencode-remote +++ b/type/__dma/gencode-remote @@ -158,7 +158,7 @@ if test -f "${__object:?}/parameter/send-test-mail" then if grep -q '^__mail_alias/root:' "${__messages_in:?}" \ || grep -q '^__dma_auth/' "${__messages_in:?}" \ - || $config_updated + || ${config_updated} then cat <<-CODE sendmail root <<'EOF' diff --git a/type/__dma/manifest b/type/__dma/manifest index 2cbd1a5..530ad09 100755 --- a/type/__dma/manifest +++ b/type/__dma/manifest @@ -21,7 +21,7 @@ os=$(cat "${__global:?}/explorer/os") # Install DMA -case $os +case ${os} in (alpine) __package dma --state present diff --git a/type/__dma_auth/explorer/state b/type/__dma_auth/explorer/state index 621e5a2..c829cd4 100755 --- a/type/__dma_auth/explorer/state +++ b/type/__dma_auth/explorer/state @@ -25,7 +25,7 @@ # different_password: a line exists but with a different password # multiple: multiple lines matching host exist (should not happen) -auth_conf=$("${__type_explorer}/auth_conf") +auth_conf=$("${__type_explorer:?}/auth_conf") test -r "${auth_conf}" || exit 0 awk -F'\n' ' diff --git a/type/__dma_auth/gencode-remote b/type/__dma_auth/gencode-remote index 4279b7a..b6a0100 100755 --- a/type/__dma_auth/gencode-remote +++ b/type/__dma_auth/gencode-remote @@ -40,7 +40,7 @@ then exit 0 fi -case $state_should +case ${state_should} in (present) test -n "${login}" || { echo '--login must be non-empty' >&2; exit 1; }