1 |
# this script gets included by config_sessions |
# this script gets called by config_sessions |
2 |
|
|
3 |
PLUGIN_NAME="egk_scm" |
PLUGIN_NAME="egk_scm" |
4 |
PLUGIN_MENUITEM_NAME="SUM_EGK" |
PLUGIN_MENUITEM_NAME="SUM_EGK" |
7 |
PLUGIN_MENUITEM_WORKDIR="" |
PLUGIN_MENUITEM_WORKDIR="" |
8 |
PLUGIN_MENUITEM_ICON="" |
PLUGIN_MENUITEM_ICON="" |
9 |
|
|
10 |
PLUGIN_AUTOSTART=1 |
PLUGIN_AUTOSTART=0 |
|
|
|
11 |
PLUGIN_PACKAGES="libusb libusb-compat pcsc-lite pcsc-plugin-ehealth200" |
PLUGIN_PACKAGES="libusb libusb-compat pcsc-lite pcsc-plugin-ehealth200" |
12 |
|
# uses rdesktop plugin config |
13 |
|
PLUGIN_CONFIG="/etc/alxconfig-ng/plugin-rdesktop.conf" |
14 |
|
|
15 |
|
# include alx functions |
16 |
|
source /etc/alxconfig-ng/config.rc |
17 |
|
source /etc/alxconfig-ng/serial |
18 |
|
source ${ALX_FUNCTIONS}/common |
19 |
|
source ${ALX_FUNCTIONS}/mysqlfunctions |
20 |
|
|
21 |
install_plugin() |
install_plugin() |
22 |
{ |
{ |
39 |
# create desktop buttons |
# create desktop buttons |
40 |
create_menuitem() |
create_menuitem() |
41 |
{ |
{ |
42 |
if [ -f /etc/alxconfig-ng/plugin-rdesktop.conf ] |
if [ -f ${PLUGIN_CONFIG} ] |
43 |
then |
then |
44 |
source /etc/alxconfig-ng/plugin-rdesktop.conf |
source ${PLUGIN_CONFIG} |
45 |
|
|
46 |
|
# use session name from rdesktop if available |
47 |
|
if [[ ! -z ${PLUGIN_CONFIG_SESSION_NAME} ]] |
48 |
|
then |
49 |
|
PLUGIN_MENUITEM_NAME="${PLUGIN_CONFIG_SESSION_NAME}" |
50 |
|
fi |
51 |
|
else |
52 |
|
# rdesktop not configured, disable plugin |
53 |
|
PLUGIN_CONFIG_PARAM="" |
54 |
|
PLUGIN_CONFIG_SERVER="" |
55 |
|
PLUGIN_MENUITEM_NAME="" |
56 |
|
PLUGIN_MENUITEM_EXEC="" |
57 |
|
PLUGIN_MENUITEM_PARAM="" |
58 |
|
PLUGIN_MENUITEM_WORKDIR="" |
59 |
|
PLUGIN_MENUITEM_ICON="" |
60 |
fi |
fi |
|
[[ -z ${PLUGIN_CONFIG_PARAM} ]] && PLUGIN_CONFIG_PARAM="" |
|
|
[[ -z ${PLUGIN_CONFIG_SERVER} ]] && PLUGIN_CONFIG_SERVER="" |
|
61 |
|
|
62 |
# don't touch these echo, define variables above |
# don't touch these echo, define variables above |
63 |
echo "PLUGIN_MENUITEM_NAME=\"${PLUGIN_MENUITEM_NAME}\"" |
echo "PLUGIN_MENUITEM_NAME=\"${PLUGIN_MENUITEM_NAME}\"" |
69 |
|
|
70 |
autostart_plugin() |
autostart_plugin() |
71 |
{ |
{ |
72 |
echo "PLUGIN_AUTOSTART=\"${PLUGIN_AUTOSTART}\"" |
# only run autostart if rdesktop was configured |
73 |
|
if [ -f ${PLUGIN_CONFIG} ] |
74 |
|
then |
75 |
|
source ${PLUGIN_CONFIG} |
76 |
|
evaluate_table plugin_egk_scm |
77 |
|
|
78 |
|
# use session name from rdesktop if available |
79 |
|
if [[ ! -z ${PLUGIN_CONFIG_SESSION_NAME} ]] |
80 |
|
then |
81 |
|
PLUGIN_MENUITEM_NAME="${PLUGIN_CONFIG_SESSION_NAME}" |
82 |
|
fi |
83 |
|
fi |
84 |
|
# sanitize variables |
85 |
|
[[ -z ${plugin_egk_scm_autostart} ]] && plugin_egk_scm_autostart=0 |
86 |
|
|
87 |
|
echo "PLUGIN_AUTOSTART=\"${plugin_egk_scm_autostart}\"" |
88 |
echo "PLUGIN_MENUITEM_NAME=\"${PLUGIN_MENUITEM_NAME}\"" |
echo "PLUGIN_MENUITEM_NAME=\"${PLUGIN_MENUITEM_NAME}\"" |
89 |
} |
} |
90 |
|
|