Magellan Linux

Diff of /alx-src/branches/alxconf-060/functions/config_printers.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2159 by niro, Tue May 17 11:45:52 2011 UTC revision 2160 by niro, Wed May 18 14:34:35 2011 UTC
# Line 8  config_printing() Line 8  config_printing()
8   local prn_ids   local prn_ids
9    
10   # first of all get the vars   # first of all get the vars
  get_printer_settings  
11   prn_ids=$(mysqldo "select id from cfg_printers where serial='${ALX_SERIAL}'")   prn_ids=$(mysqldo "select id from cfg_printers where serial='${ALX_SERIAL}'")
12    
13   # first of all delete all printers, by wiping /etc/printcap and all spooler directories   # first of all delete all printers, by wiping /etc/printcap and all spooler directories
14   CONFIG=/etc/printcap   CONFIG="/etc/printcap"
15   clearconfig   clearconfig
16    
17   if [[ -d /var/spool/lpd ]]   if [[ -d /var/spool/lpd ]]
# Line 31  config_printing() Line 30  config_printing()
30   case ${cfg_printers_port} in   case ${cfg_printers_port} in
31   lpt[0-9]*) port="/dev/lp$(( ${cfg_printers_port/lpt/}-1 ))" ;;   lpt[0-9]*) port="/dev/lp$(( ${cfg_printers_port/lpt/}-1 ))" ;;
32   com[0-9]*) port="/dev/ttyS$(( ${cfg_printers_port/com/}-1 ))" ;;   com[0-9]*) port="/dev/ttyS$(( ${cfg_printers_port/com/}-1 ))" ;;
33   usb[0-9]*) port="/dev/usb/lp$(( $cfg_printers_port/usb/}-1 ))" ;;   usb[0-9]*) port="/dev/usb/lp$(( ${cfg_printers_port/usb/}-1 ))" ;;
34   #lpd) port="lpd://${ip}/${share}" ;;   #lpd) port="lpd://${ip}/${share}" ;;
35   #socket) port="socket://${ip}:${share}" ;;   #socket) port="socket://${ip}:${share}" ;;
36   esac   esac

Legend:
Removed from v.2159  
changed lines
  Added in v.2160