LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 04-16-2015, 04:08 AM   #1
leniviy
Member
 
Registered: Jul 2009
Distribution: Archlinux
Posts: 69

Rep: Reputation: 4
In which order relative to /etc/rc.d/ are entries in /etc/init/ started or killed?


/etc/init/db2fmcd.conf :
Code:
...
start on stopped rc RUNLEVEL=[2345]
stop on starting rc RUNLEVEL=[016]
exec /opt/IBM/db2/V10.5/bin/db2fmcd
...
When I do: "init 1", what will happen first?
  • /etc/rc.d/rc1.d/K99* called
  • db2fmcd killed
 
Old 04-16-2015, 08:43 AM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Your conf file has "start on stopped rc RUNLEVEL=[2345]"

If you look in /etc/init you also have rc.conf. The above line says the triggering event is "stopped rc". (The .conf is not used when calling the name according to the man pages - see "man init" and others.

Since it says "stopped rc" that would suggest that it needs to have finished stopping all the init scripts controlled by rc such as your /etc/rc.d/rc1.d/K99*.

Given the foregoing I believe the order is:
/etc/rc.d/rc1.d/K99*
exec /opt/IBM/db2/V10.5/bin/db2fmcd

The sad thing is that until I saw your question I was blithely unaware of what /etc/init files did (as opposed to the more familiar /etc/init.d, /etc/rc.d stuff). The /etc/init were introduced for upstart and the others are from the original SysV init setup. On RHEL7 they've gone to systemd over SysV init and upstart so it doesn't have /etc/init. Therefore it appears this was only in RHEL6 (and other Linux distros such as Ubuntu).

Last edited by MensaWater; 04-16-2015 at 08:46 AM.
 
Old 04-16-2015, 08:57 AM   #3
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,700

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
Scripts run in numerical order i.e. K01XXX-K99XXX then S01XXX -. Each init.d script contains its runlevel and start/stop value. when you run the chkconfig --add command a link with that value gets created in the rc0.d-rc6.d directories.

What version of Redhat are you running?
 
  


Reply

Tags
upstart



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] Partition table entries not in disk order Bumpalot Linux - Newbie 5 02-04-2014 02:51 PM
ls -t and ls -lt list entries in the same order? stf92 Linux - Newbie 3 09-12-2011 02:17 AM
DNS entries killed my NFS Tyler_H72 Linux - Server 2 04-16-2009 03:35 PM
How do you control the order init.d scripts are started in SLES 10.2 64-Bit? j_unix Linux - Server 5 04-16-2009 12:42 PM
Apache Log - entries order kirtimaan_bkn Linux - Networking 1 01-04-2007 03:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 05:16 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