Magellan Linux

Contents of /mcore-src/trunk/mcore-tools/src/modules/scm-egk/scm-egk.client.class.in

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2803 - (show annotations) (download)
Thu Sep 1 12:07:49 2016 UTC (7 years, 7 months ago) by niro
File size: 1633 byte(s)
-fixed spelling
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 all rdesktop based RDP sessions"
18 mecho " disable - Disable scm-egk for all rdesktop based RDP sessions"
19 }
20
21 helper_rdesktop_egk_enable()
22 {
23 # add to module section
24 local CONFIG="${MROOT}/${MCORE_CONFIG_PATH}/rdesktop/config.d/scm-egk.conf"
25 clearconfig
26 addconfig "global_options+=' ${RDESKTOP_PARAM} '"
27
28 mecho "Done but rdesktop session reconfiguration is required!"
29 }
30
31 helper_rdesktop_egk_disable()
32 {
33 local CONFIG="${MROOT}/${MCORE_CONFIG_PATH}/rdesktop/config.d/scm-egk.conf"
34 clearconfig
35
36 mecho "Done but rdesktop session reconfiguration is required!"
37 }
38
39 get_rdesktop_egk()
40 {
41 if [ -f ${MROOT}/${MCORE_CONFIG_PATH}/rdesktop/config.d/scm-egk.conf ]
42 then
43 if [[ -n $(source ${MROOT}/${MCORE_CONFIG_PATH}/rdesktop/config.d/scm-egk.conf; echo "${global_options}") ]]
44 then
45 mecho "SCM-EGK facility is enabled."
46 rvecho "1"
47 else
48 mecho "SCM-EGK facility is disabled."
49 rvecho "0"
50 fi
51 else
52 mecho "SCM-EGK facility not configured yet."
53 rvecho "0"
54 fi
55 }
56
57 set_rdesktop_egk()
58 {
59 local action="${CLASS_ARGV[0]}"
60 if [[ -z ${action} ]]
61 then
62 help_rdesktop_egk
63 return 1
64 fi
65
66 case ${action} in
67 enable) helper_rdesktop_egk_enable ;;
68 disable) helper_rdesktop_egk_disable ;;
69 *) help_rdesktop_egk_service && return 1 ;;
70 esac
71 }