Bug 703148

Summary: rc.local is not starting AFTER all other init script
Product: Red Hat Enterprise Linux 5 Reporter: Balazs Zachar <balazs.zachar>
Component: initscriptsAssignee: initscripts Maintenance Team <initscripts-maint-list>
Status: CLOSED WONTFIX QA Contact: qe-baseos-daemons
Severity: low Docs Contact:
Priority: unspecified    
Version: 5.3CC: mkelly, notting
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-05-09 14:53:13 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Balazs Zachar 2011-05-09 13:00:13 UTC
Description of problem:
If you have an init script with a name which is coming after the word "local" in the alphabetical order and it has a S99 link in the rcX.d dirs then it will be started after the rc.local.

The rc.local includes the following statement:
"This script will be executed *after* all the other init scripts."

The rc.local script has the following "starting" symlinks:
Bash:root@onemachine:/root# ll /etc/rc.d/rc*.d/S99local
lrwxrwxrwx 1 root root 11 Jan 26  2010 /etc/rc.d/rc2.d/S99local -> ../rc.local
lrwxrwxrwx 1 root root 11 Jan 26  2010 /etc/rc.d/rc3.d/S99local -> ../rc.local
lrwxrwxrwx 1 root root 11 Jan 26  2010 /etc/rc.d/rc4.d/S99local -> ../rc.local
lrwxrwxrwx 1 root root 11 Jan 26  2010 /etc/rc.d/rc5.d/S99local -> ../rc.local

But if you have an init script called for example "wow" with a score 99 for start, then it will run after the rc.local script:
Bash:root@onemachine:/root# ll /etc/rc.d/rc3.d/S99*
lrwxrwxrwx 1 root root 11 Jan 26  2010 /etc/rc.d/rc3.d/S99local -> ../rc.local
lrwxrwxrwx 1 root root 27 Jan 26  2010 /etc/rc.d/rc3.d/S99wow -> ../init.d/wow


How reproducible:
Create an init script called wow. Put the following chkconfig lines into it:
# chkconfig: 35 99 95
# description: test init script
.
.
.

Use chkconfig to configure to start the script automatically on startup.

  
Actual results:
The script called wow will run after /etc/rc.d/rc.local

Expected results:
The statement in the rc.local file says it should run after all other init scripts.

Additional info:
The statement in the rc.local is confusing and not true in every case.

Comment 1 Bill Nottingham 2011-05-09 14:53:13 UTC
This is true, but is also consistent with all prior behavior, and something that would require some convolution to current practice to fix.

We suggest renaming/retargeting the other script in question if this becomes a problem for you.

Comment 2 Balazs Zachar 2011-05-09 15:05:47 UTC
(In reply to comment #1)
> This is true, but is also consistent with all prior behavior, and something
> that would require some convolution to current practice to fix.

I agree. Maybe I drew badly but I wanted to make a suggestion to change the sentence "This script will be executed *after* all the other init scripts." in the rc.local into a more accurate one. I think, it is confusing and not true.

Comment 3 Bill Nottingham 2011-05-10 19:14:37 UTC
I've changed this some upstream with http://git.fedorahosted.org/git?p=initscripts.git;a=commitdiff;h=caca80528ead03919e6157ccd2bdffff37e2dbad; this is unlikely to be backported to RHEL  at this pont.

Comment 4 Bill Nottingham 2011-07-25 19:48:26 UTC
*** Bug 725318 has been marked as a duplicate of this bug. ***