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 2177 by niro, Fri Jan 10 14:15:44 2014 UTC revision 2584 by niro, Thu Sep 17 14:34:57 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    
22  helper_addprinter()  helper_addprinter()
23  {  {
24   local name="$1"   local name="$1"
25   local port="$2"   local port="$2"
26   local ip="$3"  # local ip="$3"
27   local share="$4"  # local share="$4"
28    
29   [[ -z ${name} ]] && help_printing_printer && return 1   [[ -z ${name} ]] && help_printing_printer && return 1
30   [[ -z ${port} ]] && help_printing_printer && return 1   [[ -z ${port} ]] && help_printing_printer && return 1
# 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}" ;;
89     add) helper_addprinter "${name}" "${port}";;
90   del) helper_delprinter "${name}" ;;   del) helper_delprinter "${name}" ;;
91   *) help_printing_printer && return 1 ;;   *) help_printing_printer && return 1 ;;
92   esac   esac

Legend:
Removed from v.2177  
changed lines
  Added in v.2584