From 6eb204a85d9e48adef4e8c62bbb794830060ac40 Mon Sep 17 00:00:00 2001 From: Michael Boelen Date: Thu, 2 Apr 2020 14:45:44 +0200 Subject: [PATCH] [PRNT-2308] check for Port statement and minor adjustments to test --- include/tests_printers_spoolers | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/include/tests_printers_spoolers b/include/tests_printers_spoolers index 18c48beb..b8435493 100644 --- a/include/tests_printers_spoolers +++ b/include/tests_printers_spoolers @@ -144,14 +144,21 @@ FIND=$(${EGREPBINARY} "^(SSL)?Listen" ${CUPSD_CONFIG_FILE} | ${GREPBINARY} -v "/" | ${AWKBINARY} '{ print $2 }') COUNT=0 for ITEM in ${FIND}; do - LogText "Found network address: ${ITEM}" + LogText "Result: found network address: ${ITEM}" COUNT=$((COUNT + 1)) FOUND=1 done - # Check if daemon is only running on localhost + # Search for Port statement + FIND=$(${EGREPBINARY} "^Port 631" ${CUPSD_CONFIG_FILE}) + if [ -n "${FIND}" ]; then + LogText "Result: found CUPS listening on port 631 (most likely all interfaces)" + FOUND=1 + fi + + # Check if daemon might be running on localhost if [ ${FOUND} -eq 0 ]; then - LogText "Result: no listen statement found in CUPS configuration file" + LogText "Result: CUPS does not look to be listening on a network port" elif [ ${COUNT} -eq 1 ]; then if [ "${FIND}" = "localhost:631" -o "${FIND}" = "127.0.0.1:631" ]; then LogText "Result: CUPS daemon only running on localhost"