Magellan Linux

Contents of /alx-src/branches/alxconf-060/plugins/usbip/plugin.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3504 - (show annotations) (download) (as text)
Thu Apr 19 13:27:58 2012 UTC (12 years ago) by niro
File MIME type: application/x-sh
File size: 1384 byte(s)
-export PLUGIN_MENUITEM_NAME in autostart function which is used as name for the generated sh script
1 # this script gets included by config_sessions
2
3 PLUGIN_NAME="usbip"
4 PLUGIN_MENUITEM_NAME=""
5 PLUGIN_MENUITEM_EXEC=""
6 PLUGIN_MENUITEM_PARAM=""
7 PLUGIN_MENUITEM_WORKDIR=""
8 PLUGIN_MENUITEM_ICON=""
9
10 PLUGIN_AUTOSTART=0
11
12 PLUGIN_PACKAGES="sysfsutils usbip"
13
14 install_plugin()
15 {
16 local i
17 for i in ${PLUGIN_PACKAGES}
18 do
19 if [[ -z $(magequery -n ${i}) ]]
20 then
21 MAGE_BOOTSTRAP=true mage install ${i}
22 mage clean
23 fi
24 done
25 }
26
27 setup_plugin()
28 {
29 return 0
30 }
31
32 # create desktop buttons
33 create_menuitem()
34 {
35 # don't touch these echo, define variables above
36 echo "PLUGIN_MENUITEM_NAME=\"${PLUGIN_MENUITEM_NAME}\""
37 echo "PLUGIN_MENUITEM_EXEC=\"${PLUGIN_MENUITEM_EXEC}\""
38 echo "PLUGIN_MENUITEM_PARAM=\"${PLUGIN_MENUITEM_PARAM}\""
39 echo "PLUGIN_MENUITEM_WORKDIR=\"${PLUGIN_MENUITEM_WORKDIR}\""
40 echo "PLUGIN_MENUITEM_ICON=\"${PLUGIN_MENUITEM_ICON}\""
41 }
42
43 autostart_plugin()
44 {
45 echo "PLUGIN_AUTOSTART=\"${PLUGIN_AUTOSTART}\""
46 echo "PLUGIN_MENUITEM_NAME=\"${PLUGIN_MENUITEM_NAME}\""
47 }
48
49 uninstall_plugin()
50 {
51 local i
52 for i in ${PLUGIN_PACKAGES}
53 do
54 if [[ -n $(magequery -n ${i}) ]]
55 then
56 MAGE_BOOTSTRAP=true mage uninstall ${i}
57 mage clean
58 fi
59 done
60
61 mage clean
62 }
63
64 case $1 in
65 install) install_plugin ;;
66 setup) setup_plugin ;;
67 menuitem) create_menuitem ;;
68 autostart) autostart_plugin ;;
69 uninstall) uninstall_plugin ;;
70 *) echo "PLUGIN '${PLUGIN_NAME}': unkown operation '$1'" ;;
71 esac