diff options
Diffstat (limited to 'os-plugins/plugins/Example/XX_Example.sh')
-rw-r--r-- | os-plugins/plugins/Example/XX_Example.sh | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/os-plugins/plugins/Example/XX_Example.sh b/os-plugins/plugins/Example/XX_Example.sh index 3f58d483..cee76daf 100644 --- a/os-plugins/plugins/Example/XX_Example.sh +++ b/os-plugins/plugins/Example/XX_Example.sh @@ -24,20 +24,15 @@ # if you have any questions regarding the use of this file, please drop a mail # to: ot@openslx.com, or join the IRC-channel '#openslx' (on freenode). -if ! [ -e /initramfs/plugin-conf/Example.conf ]; then - exit 1 -fi +if [ -e /initramfs/plugin-conf/Example.conf ]; then + . /initramfs/plugin-conf/Example.conf + if [ $Example_active -ne 0 ]; then + [ $DEBUGLEVEL -gt 0 ] && echo "executing the 'Example' os-plugin ..."; -# for this example plugin, we simply take a filename from the configuration ... -. /initramfs/plugin-conf/Example.conf + # for this example plugin, we simply take a filename from the + # configuration and cat that file (output the smiley): + cat /mnt/opt/openslx/plugin-repo/Example/$preferred_side -if ! [ -n $active ]; then - exit 0 + [ $DEBUGLEVEL -gt 0 ] && echo "done with 'Example' os-plugin ..."; + fi fi - -echo "executing the 'Example' os-plugin ..."; - -# ... and cat that file (output the smiley): -cat /mnt/opt/openslx/plugin-repo/Example/$preferred_side - -echo "done with 'Example' os-plugin ..."; |