Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Init.d scripts fail if daemon is killed [SOLVED]
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
intgr
Apprentice
Apprentice


Joined: 23 Jun 2004
Posts: 225
Location: Earth, Sol, Milky Way

PostPosted: Tue Aug 10, 2004 4:15 am    Post subject: Init.d scripts fail if daemon is killed [SOLVED] Reply with quote

I hate the fact, that every time I kill a daemon (or it quits by itself because of a failure), I have to hack my way through the init.d scripts.

So, every single time I had change 'eend $?' to 'eend 0', do '/etc/init.d/x stop', change it back so it would look nice, and do a '/etc/init.d/x start'. Until I learned the start-stop-daemon --oknodo option. But why should I patch my own initscripts, when this isn't even my job?
Shouldn't initscripts use the --oknodo param for stop scripts by default? I can't come up with a reason myself, but if not, then why?
I'm sure there are some newbies out there who have been rebooting their machines just to get things into a consistent state.


Last edited by intgr on Tue Aug 10, 2004 6:09 am; edited 1 time in total
Back to top
View user's profile Send private message
PowerFactor
Veteran
Veteran


Joined: 30 Jan 2003
Posts: 1693
Location: out of it

PostPosted: Tue Aug 10, 2004 5:40 am    Post subject: Reply with quote

Try '/etc/init.d/x zap'.

Code:
 zap
      Reset a service that is currently stopped, but still marked as started,
      to the stopped state.  Basically for killing zombie services.
Back to top
View user's profile Send private message
intgr
Apprentice
Apprentice


Joined: 23 Jun 2004
Posts: 225
Location: Earth, Sol, Milky Way

PostPosted: Tue Aug 10, 2004 6:02 am    Post subject: Reply with quote

PowerFactor wrote:
Try '/etc/init.d/x zap'.

Thanks! I never knew such thing existed.
I wonder why doesn't '/sbin/runscript' mention it when you specify an invalid argument. Well, I guess it only mentions the actions that the specific initscript supports.
It does mention it, when you don't pass an argument at all though.

An admin should probably move this thread into a help forum instead :)
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20067

PostPosted: Tue Aug 10, 2004 3:49 pm    Post subject: Reply with quote

Moved from Gentoo Chat.
_________________
Quis separabit? Quo animo?
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