View previous topic :: View next topic |
Author |
Message |
Bodger n00b
Joined: 18 Nov 2004 Posts: 47
|
Posted: Fri Dec 28, 2007 1:00 am Post subject: [solved]init.d runscripts specifically depend/provide |
|
|
I hope this is the right forum to post this question in.
I want to write a init.d script and am trying to understand the part about depend.
Here is a snippet from the postfix init.d script.
Code: |
depend() {
use logger dns ypbind amavisd mysql postgresql antivirus postfix_greylist net saslauthd
provide mta
}
|
I am looking at this and cannot seem to find any good docs on it. Here are my questions.
I want to create a service that other services depend on and looking at this code paragraph it looks like this is what is happening.
If "myservice" wants to start it could set:
Code: |
depend () {
use mta
provide myservice
}
|
Then another service could depend on "myservice" and "myservice" depends on "mta".
This way "myservice" will start after Postfix.
Is this a proper way to interpret that code?
Will "myservice" be started after Postfix because of the dependency?
Both are to be installed with:
Code: |
rc-update add postfix default
rc-update add myservice default
|
Thanx
Julian
Last edited by Bodger on Fri Dec 28, 2007 3:44 am; edited 1 time in total |
|
Back to top |
|
|
Suicidal l33t
Joined: 30 Jul 2003 Posts: 959 Location: /dev/null
|
Posted: Fri Dec 28, 2007 2:03 am Post subject: |
|
|
not at my machine right now; but I think you are looking for:
need myservice
Gento initscripts |
|
Back to top |
|
|
Bodger n00b
Joined: 18 Nov 2004 Posts: 47
|
Posted: Fri Dec 28, 2007 3:44 am Post subject: |
|
|
That article is exactly what I needed.
The operative word is indeed "need".
Thanx
Julian |
|
Back to top |
|
|
|