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 2583 by niro, Thu Sep 17 14:03:58 2015 UTC revision 2584 by niro, Thu Sep 17 14:34:57 2015 UTC
# Line 16  help_printing_printer() Line 16  help_printing_printer()
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 81  set_printing_printer() Line 81  set_printing_printer()
81   local action="${CLASS_ARGV[0]}"   local action="${CLASS_ARGV[0]}"
82   local name="${CLASS_ARGV[1]}"   local name="${CLASS_ARGV[1]}"
83   local port="${CLASS_ARGV[2]}"   local port="${CLASS_ARGV[2]}"
84   local ip="${CLASS_ARGV[3]}"  # local ip="${CLASS_ARGV[3]}"
85   local share="${CLASS_ARGV[4]}"  # 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.2583  
changed lines
  Added in v.2584