From 067360db1b3d76fef5a017d8e75133579329824d Mon Sep 17 00:00:00 2001 From: mboelen Date: Sun, 19 Oct 2014 12:43:15 +0200 Subject: [PATCH] Improved qdaemon printer detection --- include/tests_printers_spools | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/tests_printers_spools b/include/tests_printers_spools index 2e44aa57..6aaf0a2a 100644 --- a/include/tests_printers_spools +++ b/include/tests_printers_spools @@ -218,8 +218,8 @@ QDAEMON_CONFIG_FILE="/etc/qconfig" FileIsReadable ${QDAEMON_CONFIG_FILE} if [ ${CANREAD} -eq 1 ]; then - FileEmpty ${QDAEMON_CONFIG_FILE} - if [ ${FILE_FOUND} -eq 0 ]; then + FIND=`grep -cv "^\*" ${QDAEMON_CONFIG_FILE} | egrep "backend|device"` + if [ ! "${FIND}" = "" ]; then logtext "Result: printers are defined in ${QDAEMON_CONFIG_FILE}" Display --indent 2 --text "- Checking /etc/qconfig file" --result FOUND --color GREEN QDAEMON_CONFIG_ENABLED=1