commit 924752b468c01c4da9afef5bb9de34053767a76a
parent 47ce17b4c1606cab6fc9f4eacffa101a81840029
Author: leitner <leitner>
Date: Tue, 4 Dec 2001 21:06:37 +0000
don't start service dependencies if they are not marked respawn and
already ran.
Diffstat:
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/CHANGES b/CHANGES
@@ -4,6 +4,8 @@
saw that the shutdown from sysvinit actually does what it's supposed
to do, even with minit, if one uses the -n mode. It should be quite
easy to write a nice and clean shutdown for minit now.
+ if a service depends on a service that already finished, don't start
+ it again.
0.6.1:
fixed msvc and minit handling of msvc -P.
diff --git a/minit.c b/minit.c
@@ -285,8 +285,11 @@ int startservice(int service,int pause) {
char **argv;
int argc,i;
argv=split(s,'\n',&argc,0,0);
- for (i=0; i<argc; i++)
- startservice(loadservice(argv[i]),0);
+ for (i=0; i<argc; i++) {
+ int service=loadservice(argv[i]);
+ if (service>=0 && root[service].pid!=1)
+ startservice(service,0);
+ }
fchdir(dir);
}
pid=startnodep(service,pause);