Magellan Linux

Annotation of /mcore-src/trunk/mcore-tools/src/modules/helpdesk/helpdesk.control.class.in

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2884 - (hide annotations) (download)
Fri Aug 14 11:38:20 2020 UTC (3 years, 8 months ago) by niro
File size: 1140 byte(s)
-encapsulate all argument variables to control_client() to evaluate them properly later on
1 niro 2720 # $Id$
2    
3     provide helpdesk
4    
5     push_config 05_helpdesk_unit
6     push_config 05_helpdesk_phone
7    
8     help_helpdesk_unit()
9     {
10     local serial="${CLASS_ARGV[0]}"
11     control_client "${serial}" help helpdesk.unit
12     }
13    
14     help_helpdesk_phone()
15     {
16     local serial="${CLASS_ARGV[0]}"
17     control_client "${serial}" help helpdesk.phone
18     }
19    
20     control_helpdesk_unit()
21     {
22     local serial="${CLASS_ARGV[0]}"
23     push_config_05_helpdesk_unit "${serial}"
24     }
25    
26     control_helpdesk_phone()
27     {
28     local serial="${CLASS_ARGV[0]}"
29     push_config_05_helpdesk_phone "${serial}"
30     }
31    
32     push_config_05_helpdesk_unit()
33     {
34     local serial="$1"
35     local value
36    
37     value=$(mysqldo "select client_locations.helpdesk_unit from client_serials inner join client_locations on client_serials.location=client_locations.location where serial='${serial}'")
38 niro 2884 control_client "${serial}" set helpdesk.unit "\"${value}\""
39 niro 2720 }
40    
41     push_config_05_helpdesk_phone()
42     {
43     local serial="$1"
44     local value
45    
46     value=$(mysqldo "select client_locations.helpdesk_phone from client_serials inner join client_locations on client_serials.location=client_locations.location where serial='${serial}'")
47 niro 2884 control_client "${serial}" set helpdesk.phone "\"${value}\""
48 niro 2720 }