LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 10-27-2010, 06:29 AM   #1
[GOD]Anck
Member
 
Registered: Dec 2003
Location: The Netherlands
Distribution: Slackware
Posts: 171

Rep: Reputation: 35
delay init.d script until network filesystem is available


I'm having some difficulty starting a service from an init.d script. It relies on the availability of a network filesystem (glusterfs) which is mounted from fstab. The service starts before the filesystem is up, and crashes.

I've tried adding "# Required-Start: $remote_fs" to the service init.d script, and delaying it by changing the ordering with "update-rc.d service defaults 90", but neither seems to work. If I add a "sleep 10" to the script, that works, but it feels wrong.

Is there some way to get the ordering right? To delay starting the service until after everything in fstab is ready to go?

The OS is debian lenny, with glusterfs 3.0.5 from backports.
 
Old 10-27-2010, 07:15 AM   #2
jim_p
Member
 
Registered: Aug 2009
Distribution: Debian testing
Posts: 564

Rep: Reputation: 131Reputation: 131
How about adding it as an option after the interface comes up, in /etc/network/interfaces that is.

I am not in front of my pc now so as to make an example, so please check "man interfaces" > post-up part.
 
Old 10-27-2010, 10:10 PM   #3
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
In addition to $remote_fs, have you tried adding $network?

Evo2.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Ubuntu 10.04 delay mounting network shares in fstab until network is up politik Linux - Networking 14 06-24-2010 07:36 PM
Init script in /etc/init.d does not start at boot tdnnash25 Linux - Server 4 12-18-2009 04:40 PM
target filesystem doesn't have /sbin/init bklein Debian 1 10-05-2009 02:30 AM
help with understanding /ect/init.d/network script LDZ420 Linux - Newbie 2 05-19-2006 04:07 PM
network init script bug? ardya Slackware 8 05-11-2006 01:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 01:53 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration