Magellan Linux

Annotation of /alx-src/branches/alxconf-060/plugins/egk-scm/plugin.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3494 - (hide annotations) (download) (as text)
Mon Apr 16 12:48:36 2012 UTC (12 years ago) by niro
File MIME type: application/x-sh
File size: 1701 byte(s)
-let the egk-scm plugin be configurable through /etc/alxconfig-ng/plugin-rdesktop.conf
1 niro 3393 # this script gets included by config_sessions
2    
3 niro 3470 PLUGIN_NAME="egk-scm"
4 niro 3393 PLUGIN_MENUITEM_NAME="SUM_EGK"
5     PLUGIN_MENUITEM_EXEC="rdesktop"
6 niro 3494 PLUGIN_MENUITEM_PARAM='-r scard:\"eHealth200 Terminal 00 00\"=\"SCM Microsystems Inc. Terminal0-Patient slot 0\",\"eHealth200 Terminal 00 01\"=\"SCM Microsystems Inc. Terminal0-Doctor slot 0\"'
7 niro 3393 PLUGIN_MENUITEM_WORKDIR=""
8     PLUGIN_MENUITEM_ICON=""
9    
10     PLUGIN_PACKAGES="libusb libusb-compat pcsc-lite pcsc-plugin-ehealth200"
11    
12     install_plugin()
13     {
14     local i
15     for i in ${PLUGIN_PACKAGES}
16     do
17     if [[ -z $(magequery -n ${i}) ]]
18     then
19     MAGE_BOOTSTRAP=true mage install ${i}
20     mage clean
21     fi
22     done
23     }
24    
25     setup_plugin()
26     {
27     return 0
28     }
29    
30     # create desktop buttons
31     create_menuitem()
32     {
33 niro 3494 if [ -f /etc/alxconfig-ng/plugin-rdesktop.conf ]
34     then
35     source /etc/alxconfig-ng/plugin-rdesktop.conf
36     fi
37     [[ -z ${PLUGIN_CONFIG_PARAM} ]] && PLUGIN_CONFIG_PARAM=""
38     [[ -z ${PLUGIN_CONFIG_SERVER} ]] && PLUGIN_CONFIG_SERVER=""
39    
40 niro 3393 # don't touch these echo, define variables above
41     echo "PLUGIN_MENUITEM_NAME=\"${PLUGIN_MENUITEM_NAME}\""
42     echo "PLUGIN_MENUITEM_EXEC=\"${PLUGIN_MENUITEM_EXEC}\""
43 niro 3494 echo "PLUGIN_MENUITEM_PARAM=\"${PLUGIN_CONFIG_PARAM} ${PLUGIN_MENUITEM_PARAM} ${PLUGIN_CONFIG_SERVER}\""
44 niro 3393 echo "PLUGIN_MENUITEM_WORKDIR=\"${PLUGIN_MENUITEM_WORKDIR}\""
45     echo "PLUGIN_MENUITEM_ICON=\"${PLUGIN_MENUITEM_ICON}\""
46     }
47    
48     uninstall_plugin()
49     {
50     local i
51     for i in ${PLUGIN_PACKAGES}
52     do
53     if [[ -n $(magequery -n ${i}) ]]
54     then
55     MAGE_BOOTSTRAP=true mage uninstall ${i}
56     mage clean
57     fi
58     done
59    
60     mage clean
61     }
62    
63     case $1 in
64     install) install_plugin ;;
65     setup) setup_plugin ;;
66     menuitem) create_menuitem ;;
67     uninstall) uninstall_plugin ;;
68     *) echo "PLUGIN '${PLUGIN_NAME}': unkown operation '$1'" ;;
69     esac