Contents of /mcore-src/trunk/mcore-tools/src/modules/scm-egk/scm-egk.client.class.in
Parent Directory | Revision Log
Revision 2743 -
(show annotations)
(download)
Thu Jan 28 15:35:59 2016 UTC (8 years, 8 months ago) by niro
File size: 1634 byte(s)
Thu Jan 28 15:35:59 2016 UTC (8 years, 8 months ago) by niro
File size: 1634 byte(s)
-fixed evaluation
1 | # $Id$ |
2 | |
3 | provide scm-egk |
4 | require rdesktop |
5 | |
6 | # scm-egk global config |
7 | include @@SYSCONFDIR@@/mcore/scm-egk.conf |
8 | |
9 | help_rdesktop_egk() |
10 | { |
11 | mecho "get rdesktop.egk" |
12 | mecho " Shows SCM-EGK facility status for all rdesktop based RDP sessions." |
13 | mecho |
14 | mecho "set rdesktop.scm-egk [command]" |
15 | mecho " Controls the SCM-EGK facility." |
16 | mecho " Commands:" |
17 | mecho " enable - Enable scm-egk for the all rdesktop based RDP sessions" |
18 | mecho " disable - scm-egk for the all rdesktop based RDP sessions" |
19 | } |
20 | |
21 | helper_rdesktop_egk_enable() |
22 | { |
23 | |
24 | # add to module section |
25 | local CONFIG="${MROOT}/${MCORE_CONFIG_PATH}/rdesktop/config.d/scm-egk.conf" |
26 | clearconfig |
27 | addconfig "global_options+=' ${RDESKTOP_PARAM} '" |
28 | |
29 | mecho "Done but rdesktop session reconfiguration is required!" |
30 | } |
31 | |
32 | helper_rdesktop_egk_disable() |
33 | { |
34 | local CONFIG="${MROOT}/${MCORE_CONFIG_PATH}/rdesktop/config.d/scm-egk.conf" |
35 | clearconfig |
36 | |
37 | mecho "Done but rdesktop session reconfiguration is required!" |
38 | } |
39 | |
40 | get_rdesktop_egk() |
41 | { |
42 | if [ -f ${MROOT}/${MCORE_CONFIG_PATH}/rdesktop/config.d/scm-egk.conf ] |
43 | then |
44 | if [[ -n $(source ${MROOT}/${MCORE_CONFIG_PATH}/rdesktop/config.d/scm-egk.conf; echo "${global_options}") ]] |
45 | then |
46 | mecho "SCM-EGK facility is enabled." |
47 | rvecho "1" |
48 | else |
49 | mecho "SCM-EGK facility is disabled." |
50 | rvecho "0" |
51 | fi |
52 | else |
53 | mecho "SCM-EGK facility not configured yet." |
54 | rvecho "0" |
55 | fi |
56 | } |
57 | |
58 | set_rdesktop_egk() |
59 | { |
60 | local action="${CLASS_ARGV[0]}" |
61 | if [[ -z ${action} ]] |
62 | then |
63 | help_rdesktop_egk |
64 | return 1 |
65 | fi |
66 | |
67 | case ${action} in |
68 | enable) helper_rdesktop_egk_enable ;; |
69 | disable) helper_rdesktop_egk_disable ;; |
70 | *) help_rdesktop_egk_service && return 1 ;; |
71 | esac |
72 | } |