@@ -18,21 +18,36 @@ start_deps() {
1818 exit $RETVAL
1919}
2020
21+start_softdeps() {
22+ for i in $softdeps
23+ $i start
24+ RETVAL=$?
25+ if test $RETVAL != 0; then
26+ continue
27+}
28+
2129start() {
22− # aren't we already running?
23− # @gnugrep@/bin/grep $prog
30+ # are we already running?
31+ # if so, exit with code 0
32+ if test -a $STATDIR/$prog = 1; then
33+ exit 0
34+ # if not, continue
2435 # launch all hard dependencies
2536 start_deps
2637 # launch all preferred dependencies
38+ start_softdeps
39+ # launch our own program
2740}
2841
2942stop() {
3043 # are we running? If so, then stop, otherwise, do nothing...
31− if test -a $STATDIR/program = 0; then
32− echo "bla"
44+ if test -a $STATDIR/$prog = 0; then
45+ exit 0
46+ # stop our own program
3347}
3448
3549register() {
50+ touch $STATEDIR/$prog
3651}
3752
3853unregister() {