Magellan Linux

Diff of /mcore-src/trunk/mcore-tools/src/modules/lprng/printing.client.class.in

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

revision 2176 by niro, Fri Jan 10 14:15:09 2014 UTC revision 2583 by niro, Thu Sep 17 14:03:58 2015 UTC
# Line 1  Line 1 
1  # $Id$  # $Id$
2    
3  provide lprng  provide printing lprng
4    
5  help_printing_printer()  help_printing_printer()
6  {  {
# Line 15  help_printing_printer() Line 15  help_printing_printer()
15   mecho   mecho
16   mecho "   name  - name of the printer"   mecho "   name  - name of the printer"
17   mecho "   port  - printing port (lpt1, usb1, com1 ... lptN, usbN, comN"   mecho "   port  - printing port (lpt1, usb1, com1 ... lptN, usbN, comN"
18   mecho "   ip    - ip of the remote printer - optional"  # mecho "   ip    - ip of the remote printer - optional"
19   mecho "   share - share/port name of the remote printer - optional"   mecho "   share - share/port name of the remote printer - optional"
20  }  }
21    
# Line 34  helper_addprinter() Line 34  helper_addprinter()
34   case ${port} in   case ${port} in
35   lpt[0-9]*) port="/dev/lp$(( ${port/lpt/}-1 ))" ;;   lpt[0-9]*) port="/dev/lp$(( ${port/lpt/}-1 ))" ;;
36   com[0-9]*) port="/dev/ttyS$(( ${port/com/}-1 ))" ;;   com[0-9]*) port="/dev/ttyS$(( ${port/com/}-1 ))" ;;
37   usb[0-9]*) port="/dev/usb/lp$(( ${port/usb/}-1 ))" ;;   usb[0-9]*) port="/dev/usb/lp$(( ${port/usb/}-1 ))" ;;
38   #lpd) port="lpd://${ip}/${share}" ;;   #lpd) port="lpd://${ip}/${share}" ;;
39   #socket) port="socket://${ip}:${share}" ;;   #socket) port="socket://${ip}:${share}" ;;
40   esac   esac
# Line 78  helper_delprinter() Line 78  helper_delprinter()
78    
79  set_printing_printer()  set_printing_printer()
80  {  {
81   local action="$1"   local action="${CLASS_ARGV[0]}"
82   local name="$2"   local name="${CLASS_ARGV[1]}"
83   local port="$3"   local port="${CLASS_ARGV[2]}"
84   local ip="$4"   local ip="${CLASS_ARGV[3]}"
85   local share="$5"   local share="${CLASS_ARGV[4]}"
86    
87   case "${action}" in   case "${action}" in
88   add) helper_addprinter "${name}" "${port}" "${ip}" "${share}" ;;   add) helper_addprinter "${name}" "${port}" "${ip}" "${share}" ;;

Legend:
Removed from v.2176  
changed lines
  Added in v.2583