From c2fda32d0d41c922e65484f1e07e66dfca966bb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Lecour?= Date: Fri, 22 Mar 2019 20:12:30 +0100 Subject: [PATCH] extract main conditional --- evocheck.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/evocheck.sh b/evocheck.sh index c9a1d13..16380f8 100755 --- a/evocheck.sh +++ b/evocheck.sh @@ -684,7 +684,10 @@ if is_debian; then # Verification de la priorité du package samba si les backports sont utilisés if [ "$IS_SAMBAPINPRIORITY" = 1 ]; then if is_pack_samba; then - grep -qrE "^[^#].*backport" /etc/apt/sources.list{,.d} && ( priority=$(grep -E -A2 "^Package:.*samba" /etc/apt/preferences |grep -A1 "^Pin: release a=lenny-backports" |grep "^Pin-Priority:" |cut -f2 -d" ") && test $priority -gt 500 || failed "IS_SAMBAPINPRIORITY" ) + if grep -qrE "^[^#].*backport" /etc/apt/sources.list{,.d}; then + priority=$(grep -E -A2 "^Package:.*samba" /etc/apt/preferences | grep -A1 "^Pin: release a=lenny-backports" | grep "^Pin-Priority:" | cut -f2 -d" ") + test $priority -gt 500 || failed "IS_SAMBAPINPRIORITY" + fi fi fi