diff options
author | beelsr <beels@technologist.com> | 2016-07-30 18:14:51 +0300 |
---|---|---|
committer | Michael Boelen <michael.boelen@cisofy.com> | 2016-07-30 18:14:51 +0300 |
commit | 4143cd69b5da06df39a0b5f318898569291c4deb (patch) | |
tree | 2a13456ef823d078d2020047c4f6daaa2b7638dc | |
parent | cf9794a4a9a8c0954500b024ffc4b7f5e58ea7ca (diff) |
fix yum gpgenabled check to allow spaces around = (#247)
Issue 245
yum.conf allows an arbitrary number of spaces to surround the equals assignment.
-rw-r--r-- | include/tests_ports_packages | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/tests_ports_packages b/include/tests_ports_packages index 5902c544..e23f6fe0 100644 --- a/include/tests_ports_packages +++ b/include/tests_ports_packages @@ -823,8 +823,8 @@ FOUND=0 FileExists /etc/yum.conf if [ ${FILE_FOUND} -eq 1 ]; then - SearchItem "^gpgenabled=1$" "/etc/yum.conf"; if [ ${ITEM_FOUND} -eq 1 ]; then FOUND=1; fi - SearchItem "^gpgcheck=1$" "/etc/yum.conf"; if [ ${ITEM_FOUND} -eq 1 ]; then FOUND=1; fi + SearchItem "^gpgenabled\s*=\s*1$" "/etc/yum.conf"; if [ ${ITEM_FOUND} -eq 1 ]; then FOUND=1; fi + SearchItem "^gpgcheck\s*=\s*1$" "/etc/yum.conf"; if [ ${ITEM_FOUND} -eq 1 ]; 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 |