Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How to change the order of init services
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
audiodef
Watchman
Watchman


Joined: 06 Jul 2005
Posts: 6639
Location: The soundosphere

PostPosted: Sun Jan 31, 2010 6:43 pm    Post subject: How to change the order of init services Reply with quote

How do I get a service to start as late as possible - last, preferably? I created an init script, which has problems if it starts too soon, but once I'm logged in, I can start it manually without a problem. I have it in the default run level. How do I delay its execution until a certain point - or simply make it the last one to execute on boot up?
_________________
decibel Linux: https://decibellinux.org
Github: https://github.com/Gentoo-Music-and-Audio-Technology
Facebook: https://www.facebook.com/decibellinux
Discord: https://discord.gg/73XV24dNPN
Back to top
View user's profile Send private message
Mike Hunt
Watchman
Watchman


Joined: 19 Jul 2009
Posts: 5287

PostPosted: Sun Jan 31, 2010 6:47 pm    Post subject: Reply with quote

This could work:
Code:
depend() {
        after *
}

but might conflict with /etc/init.d/local - not sure.

Maybe start it from local.


Last edited by Mike Hunt on Sun Jan 31, 2010 6:51 pm; edited 1 time in total
Back to top
View user's profile Send private message
Sadako
Advocate
Advocate


Joined: 05 Aug 2004
Posts: 3792
Location: sleeping in the bathtub

PostPosted: Sun Jan 31, 2010 6:49 pm    Post subject: Reply with quote

Ideally, you would figure out what services it needs started before it so it can start successfully, and add them to "after" within depend(), but if that doesn't seem feasible just try with;
Code:
depend()
{
    before local
}
It's been a while, but I'm pretty sure that did the trick before.
_________________
"You have to invite me in"
Back to top
View user's profile Send private message
Mike Hunt
Watchman
Watchman


Joined: 19 Jul 2009
Posts: 5287

PostPosted: Sun Jan 31, 2010 6:53 pm    Post subject: Reply with quote

I think that before local can cause it to start any time in no particular order - not sure.

Once when I did one of those I put it after xdm which starts quite late.
Back to top
View user's profile Send private message
tgR10
Apprentice
Apprentice


Joined: 23 Oct 2007
Posts: 262
Location: caly ten ambaras

PostPosted: Sun Jan 31, 2010 7:30 pm    Post subject: Reply with quote

you can do something like this
Quote:

depend()
{
after hald
before local
need xdm
}

etc ..
or like in /etc/init.d/local
Quote:
depend()
{
after *
}

_________________
"bo kto ma racje ? ten kto z bliska zobaczy"
"moge nie wiedziec,wchlaniam niewiedze z malych torebek"
http://i12.tinypic.com/4pow0mu.png
http://userbar.tgr.debil.eu/userbar.jpg
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum