From c052e507eb4103c6a82a80db0b5e7b4837dc5562 Mon Sep 17 00:00:00 2001 From: Ander Punnar Date: Sun, 2 Jul 2017 11:50:22 +0300 Subject: [PATCH] shellcheck __apt_mark --- cdist/conf/type/__apt_mark/explorer/apt_version | 2 +- cdist/conf/type/__apt_mark/explorer/package_installed | 2 +- cdist/conf/type/__apt_mark/explorer/state | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cdist/conf/type/__apt_mark/explorer/apt_version b/cdist/conf/type/__apt_mark/explorer/apt_version index 32a0a58f..827d9db2 100644 --- a/cdist/conf/type/__apt_mark/explorer/apt_version +++ b/cdist/conf/type/__apt_mark/explorer/apt_version @@ -26,6 +26,6 @@ apt_version_is=$(dpkg-query --show --showformat '${Version}' apt) apt_version_should=0.8.14.2 -dpkg --compare-versions $apt_version_should le $apt_version_is \ +dpkg --compare-versions "$apt_version_should" le "$apt_version_is" \ && echo 0 \ || echo 1 diff --git a/cdist/conf/type/__apt_mark/explorer/package_installed b/cdist/conf/type/__apt_mark/explorer/package_installed index c78ac3a9..c37c5e76 100644 --- a/cdist/conf/type/__apt_mark/explorer/package_installed +++ b/cdist/conf/type/__apt_mark/explorer/package_installed @@ -24,7 +24,7 @@ else name="$__object_id" fi -dpkg-query --show --showformat '${Status}' $name 2>/dev/null \ +dpkg-query --show --showformat '${Status}' "$name" 2>/dev/null \ | grep -q 'ok installed' \ && echo 0 \ || echo 1 diff --git a/cdist/conf/type/__apt_mark/explorer/state b/cdist/conf/type/__apt_mark/explorer/state index 3b70003a..565ad70f 100644 --- a/cdist/conf/type/__apt_mark/explorer/state +++ b/cdist/conf/type/__apt_mark/explorer/state @@ -24,4 +24,4 @@ else name="$__object_id" fi -apt-mark showhold | grep -q $name && echo hold || echo unhold +apt-mark showhold | grep -q "$name" && echo hold || echo unhold