diff --git a/tests/p_initscripts/initscripts_service_status.sh b/tests/p_initscripts/initscripts_service_status.sh index e930a40..e307b83 100755 --- a/tests/p_initscripts/initscripts_service_status.sh +++ b/tests/p_initscripts/initscripts_service_status.sh @@ -8,8 +8,13 @@ fi t_Log "Running $0 - check if service cmd can get service status" -# auditd is used as example because it's standard with minimal install -service auditd status +output_file=$(mktemp) +trap "rm -f ${output_file}" EXIT -t_CheckExitStatus $? +# auditd is used as example because it's standard with minimal install +if ! service auditd status > ${output_file} 2>&1; then + cat ${output_file} + t_CheckExitStatus 1 +fi +t_CheckExitStatus 0