--- alx-src/branches/alxconf-060/functions/config_printers.sh 2011/07/06 14:44:40 2609 +++ alx-src/branches/alxconf-060/functions/config_printers.sh 2011/07/06 21:33:33 2610 @@ -26,6 +26,14 @@ for i in ${prn_ids} do evaluate_table cfg_printers "where serial='${ALX_SERIAL}' and id='${i}'" + + # do not add any printers if the name is empty - warn the user + if [[ -z ${cfg_printers_printer_name} ]] + then + echo -e "${COLRED}No printer_name given in config of printer '${i}' with port '${cfg_printers_port}'. Not added!${COLDEFAULT}" + continue + fi + # get real port settings case ${cfg_printers_port} in lpt[0-9]*) port="/dev/lp$(( ${cfg_printers_port/lpt/}-1 ))" ;;