Setting tag myplc-5.0-11
[myplc.git] / plc.init
index 309523e..fc93b7e 100755 (executable)
--- a/plc.init
+++ b/plc.init
@@ -7,6 +7,7 @@
 # description: Manages all PLC services on this machine
 #
 # $Id$
+# $URL$
 #
 
 # Source function library and configuration
@@ -34,10 +35,11 @@ verbose=0
 # but that's maybe a good thing, that all is done at first start
 ###
 
+# do not consider files that contain '.', '~' or 'functions' in the name
 steps=($(
 for step in /etc/plc.d/* ; do
     stepname=$(basename $step)
-    plainstepname=$(echo $stepname | sed -e 's,\.,,' -e 's,~,,')
+    plainstepname=$(echo $stepname | sed -e 's,\.,,' -e 's,~,,' -e 's,functions,,' )
     if [ -f $step -a -x $step -a "$stepname" = "$plainstepname" ] ; then
        priority=$(sed -ne 's/# priority: \(.*\)/\1/p' $step)
        echo $priority $stepname
@@ -133,7 +135,7 @@ fi
 # Get command
 shift $(($OPTIND - 1))
 if [ -z "$1" ] ; then
-    usage
+    usage >&3
 fi
 command=$1