diff options
author | mboelen <michael@cisofy.com> | 2014-09-08 21:39:11 +0400 |
---|---|---|
committer | mboelen <michael@cisofy.com> | 2014-09-08 21:39:11 +0400 |
commit | 2ce4cf5c5712dfa7a2bceba34d09a9de96cf167f (patch) | |
tree | 684034b0c04e36e1562ac842414a38ee021b141a /include | |
parent | 3f7d0260e5138596ef13484c25b83245d4be2bf2 (diff) |
Redirect stderr for host command
Diffstat (limited to 'include')
-rw-r--r-- | include/functions | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/functions b/include/functions index 9dbee28a..c0cb7ef5 100644 --- a/include/functions +++ b/include/functions @@ -117,7 +117,7 @@ else FIND=`which host 2> /dev/null` if [ ! "${FIND}" = "" ]; then - PROGRAM_LV=`host -t txt lynis-lv.rootkit.nl | awk '{ if ($1=="lynis-lv.rootkit.nl" && $3=="text") { print $4 }}' | sed 's/"//g'` + PROGRAM_LV=`host -t txt lynis-lv.rootkit.nl 2> /dev/null | awk '{ if ($1=="lynis-lv.rootkit.nl" && $3=="text") { print $4 }}' | sed 's/"//g'` if [ "${PROGRAM_LV}" = "" ]; then PROGRAM_LV=0; fi else logtext "Result: dig and host not installed, update check skipped" @@ -751,8 +751,8 @@ # Skip if a test is root only and we are running a non-privileged test if [ ${ROOT_ONLY} -eq 1 -a ! ${MYID} = "0" ]; then SKIPTEST=1; SKIPREASON="This test needs root permissions" - Debug "Test ${TEST_NO} skipped as this one required root permissions to work" - SKIPPED_TESTS_ROOTONLY="${SKIPPED_TESTS_ROOTONLY}====${TEST_NO}:space:${TEST_DESCRIPTION}" + SKIPPED_TESTS_ROOTONLY="${SKIPPED_TESTS_ROOTONLY}====${TEST_NO}:space:-:space:${TEST_DESCRIPTION}" + #SkipTest "${TEST_NO}:Test:space:requires:space:root:space:permissions:-:-:" fi # Skip test if it's configured in profile @@ -771,7 +771,7 @@ if [ ${SKIPTEST} -eq 0 -a "${TEST_WEIGHT}" = "H" -a "${SCAN_TEST_HEAVY}" = "NO" ]; then SKIPTEST=1; SKIPREASON="Test to system intensive for scan mode (H)"; fi if [ ${SKIPTEST} -eq 0 -a "${TEST_WEIGHT}" = "M" -a "${SCAN_TEST_MEDIUM}" = "NO" ]; then SKIPTEST=1; SKIPREASON="Test to system intensive for scan mode (M)"; fi - # Skip test if OS is different than requested + # Skip test if OS is different than requested if [ ${SKIPTEST} -eq 0 -a ! -z "${TEST_NEED_OS}" -a ! "${OS}" = "${TEST_NEED_OS}" ]; then SKIPTEST=1; SKIPREASON="Incorrect guest OS (${TEST_NEED_OS} only)" if [ ${LOG_INCORRECT_OS} -eq 0 ]; then |