LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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 02-21-2011, 05:49 PM   #1
jlinkels
Senior Member
 
Registered: Oct 2003
Location: Bonaire
Distribution: Debian Lenny/Squeeze/Wheezy/Sid
Posts: 4,067

Rep: Reputation: 491Reputation: 491Reputation: 491Reputation: 491Reputation: 491
Dealing with boot dependencies (NIS, user program)


Dealing with boot dependencies as Squeeze installs them is not always that easy. After installation of this box I had to install NIS and a user program which runs in the background, but needs credentials obtained thru NIS. The user program should start during boot as well.

The header of the NIS startup script looked like:
Code:
### BEGIN INIT INFO
# Provides:             ypbind ypserv ypxfrd yppasswdd
# Required-Start:       $network $portmap
# Required-Stop:        $portmap
# Default-Start:        2 3 4 5
# Default-Stop:         0 1 6
But NIS would not start at boot time. After a terrible long timeout delay booting would continue. Looking at the on-screen messages, it appeared that network-manager had to run before NIS would start. That is strange, as the virtual dependency $network had to be satisfied as well. Anyway, after modifying the header to this:
Code:
### BEGIN INIT INFO
# Provides:             ypbind ypserv ypxfrd yppasswdd
# Required-Start:       $network $portmap network-manager
# Required-Stop:        $portmap
# Default-Start:        2 3 4 5
# Default-Stop:         0 1 6
That made NIS run, but not my own script. This scripts header was:
Code:
### BEGIN INIT INFO
# Provides:          detect_gate
# Required-Start:    $network $portmap
# Required-Stop:     1
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
Because NIS was started later after network-manager was started, my own script failed to start, because the script used credentials only available thru NIS.

This would not help either:
Code:
### BEGIN INIT INFO
# Provides:          detect_gate
# Required-Start:    $network $portmap network-manager
# Required-Stop:     1
as now NIS and my script would start concurrently.

No, this would not do the trick either, as a matter of fact update-rc.d would not even install the script:
Code:
### BEGIN INIT INFO
# Provides:          detect_gate
# Required-Start:    $network $portmap nis
# Required-Stop:     1
because NIS is not a package. Look in the NIS script and look at the Provides line.

The solution was of course the specify the package Provided by NIS:
Code:
### BEGIN INIT INFO
# Provides:          detect_gate
# Required-Start:    $network $portmap ypbind
# Required-Stop:     1
Now everything is fine, and booting is very fast, a significant improvement from the old system. I hope I solved this in the right way. Also I am not sure this is a bug which should be filed against the NIS installation package.

jlinkels
 
Old 02-23-2011, 01:01 AM   #2
oOarthurOo
LQ Newbie
 
Registered: Feb 2011
Location: ZZ9 Plural Z Alpha
Distribution: Debian
Posts: 17

Rep: Reputation: 5
Another option is to look into the /etc/insserv.conf file, and create your own virtual dependency there. When you look in that file you'll see why network-manager wasn't started even though network is listed. I don't see anything wrong with your solution though.

There is no need to call update-rc.d anymore, just call insserv after making any changes to lsb headers and it will read those headers and use update-rc.d itself.
 
1 members found this post helpful.
Old 02-23-2011, 01:50 PM   #3
jlinkels
Senior Member
 
Registered: Oct 2003
Location: Bonaire
Distribution: Debian Lenny/Squeeze/Wheezy/Sid
Posts: 4,067

Original Poster
Rep: Reputation: 491Reputation: 491Reputation: 491Reputation: 491Reputation: 491
I haven't thought about editing/creating a virtual dependency, but it seems a good idea.

jlinkels
 
  


Reply

Tags
dependency booting, nis, squeeze, update-rc.d, ypbind


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Python socket question dealing with the ip address when its user entered xskycamefalling Programming 1 03-24-2010 01:48 AM
Unable to login to NIS client machine(Ubuntu) using NIS login user name crazymoonboy Linux - Server 7 11-27-2009 02:29 AM
[SOLVED] Compiling programs from source and dealing with dependencies on Slackware. Switch7 Slackware 36 11-04-2009 05:08 AM
NIS failed for one user on one NIS client - strange problem resolved catbird Linux - Networking 1 10-05-2009 11:00 AM
Bash script: Dealing with program input from a pipe sleeper0110 Linux - Software 5 04-28-2009 03:41 PM


All times are GMT -5. The time now is 10:27 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration