From 367756d6b2fbed2325012812f71fbc4a1e817051 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Lecour?= Date: Fri, 22 Mar 2019 00:04:01 +0100 Subject: [PATCH] variables extraction --- evocheck.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/evocheck.sh b/evocheck.sh index 7718e58..f197365 100755 --- a/evocheck.sh +++ b/evocheck.sh @@ -229,7 +229,10 @@ if is_debian; then if [ "$IS_LSBRELEASE" = "1" ]; then test -x "${LSB_RELEASE_BIN}" || failed "IS_LSBRELEASE" "lsb_release is missing or not executable" - test "$(${LSB_RELEASE_BIN} --release --short)" = "$(cat /etc/debian_version)" || failed "IS_LSBRELEASE" "release is not consistent between lsb_release and /etc/debian_version" + + lhs=$(${LSB_RELEASE_BIN} --release --short) + rhs=$(cat /etc/debian_version) + test "$lhs" = "$rhs" || failed "IS_LSBRELEASE" "release is not consistent between lsb_release and /etc/debian_version" fi if [ "$IS_DPKGWARNING" = 1 ]; then @@ -720,7 +723,9 @@ if is_debian; then # Check if /etc/.git/ has read/write permissions for root only. if [ "$IS_GITPERMS" = 1 ]; then if test -d /etc/.git; then - [ "$(stat -c "%a" /etc/.git/)" = "700" ] || failed "IS_GITPERMS" + expected="700" + actual=$(stat -c "%a" /etc/.git/) + [ "$expected" = "$actual" ] || failed "IS_GITPERMS" fi fi