diff options
author | Michael Boelen <michael.boelen@cisofy.com> | 2019-07-10 20:35:51 +0300 |
---|---|---|
committer | Michael Boelen <michael.boelen@cisofy.com> | 2019-07-10 20:35:51 +0300 |
commit | c97dc3044a0883533a8b36f8eb0e39426aa2ddb4 (patch) | |
tree | e233aa589f5e1b38f30d83f4c73a6d4d8071e4df /include/tests_ports_packages | |
parent | d41b1d9c5fc265c327c65fc85d01a2430216f5c1 (diff) |
Use exit code instead of ITEM_FOUND value
Diffstat (limited to 'include/tests_ports_packages')
-rw-r--r-- | include/tests_ports_packages | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/include/tests_ports_packages b/include/tests_ports_packages index 2d8b997e..6b6b2ed9 100644 --- a/include/tests_ports_packages +++ b/include/tests_ports_packages @@ -879,8 +879,7 @@ if [ ${DO_TEST} -eq 0 ]; then FileExists ${ROOTDIR}usr/share/yum-cli/cli.py if [ ${FILE_FOUND} -eq 1 ]; then - SearchItem "\-\-security" "${ROOTDIR}usr/share/yum-cli/cli.py" - if [ ${ITEM_FOUND} -eq 1 ]; then + if SearchItem "\-\-security" "${ROOTDIR}usr/share/yum-cli/cli.py"; then DO_TEST=1 LogText "Result: found built-in security in yum" else @@ -892,8 +891,7 @@ if [ ${DO_TEST} -eq 0 ]; then FileExists ${ROOTDIR}etc/yum/pluginconf.d/security.conf if [ ${FILE_FOUND} -eq 1 ]; then - SearchItem "^enabled=1$" "${ROOTDIR}etc/yum/pluginconf.d/security.conf" - if [ ${ITEM_FOUND} -eq 1 ]; then + if SearchItem "^enabled=1$" "${ROOTDIR}etc/yum/pluginconf.d/security.conf"; then DO_TEST=1 LogText "Result: found enabled plugin" else @@ -967,8 +965,8 @@ FOUND=0 FileExists ${ROOTDIR}etc/yum.conf if [ ${FILE_FOUND} -eq 1 ]; then - SearchItem "^gpgenabled\s*=\s*1$" "${ROOTDIR}etc/yum.conf"; if [ ${ITEM_FOUND} -eq 1 ]; then FOUND=1; fi - SearchItem "^gpgcheck\s*=\s*1$" "${ROOTDIR}etc/yum.conf"; if [ ${ITEM_FOUND} -eq 1 ]; then FOUND=1; fi + if SearchItem "^gpgenabled\s*=\s*1$" "${ROOTDIR}etc/yum.conf"; then FOUND=1; fi + if SearchItem "^gpgcheck\s*=\s*1$" "${ROOTDIR}etc/yum.conf"; then FOUND=1; fi if [ ${FOUND} -eq 1 ]; then LogText "Result: GPG check is enabled" Display --indent 2 --text "- Checking GPG checks (yum.conf)" --result "${STATUS_OK}" --color GREEN |