Bug 9947 - rc.local not executed, and suggested fix
rc.local not executed, and suggested fix
Status: CLOSED WORKSFORME
Product: Red Hat Linux
Classification: Retired
Component: initscripts (Show other bugs)
6.1
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2000-03-03 21:52 EST by wjwarner
Modified: 2014-03-16 22:12 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-03-04 13:01:23 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description wjwarner 2000-03-03 21:52:52 EST
BugID#-6256 previously reported the same problem.

I am using initscripts-4.70-1.i386.rpm.

The Problem:
I added a /sbin/hdparm line in /etc/rc.d/rc.local and
found that it was not run on boot.

Suggested Fix:
My fix was to add a new file /etc/rc.d/init.d/local
content as follows:
----------------------------------------
#!/bin/sh
#
# This  script runs /etc/rc.d/rc.local
#
#


# Source function library.
. /etc/rc.d/init.d/functions

# See how we were called.
case "$1" in
  start)
        echo -n "Running /etc/rc.d/rc.local:"
        daemon /etc/rc.d/rc.local
        echo
        ;;
  stop)
        ;;
  status)
        ;;
  restart)
        ;;
  reload)
        ;;
  *)
        echo "Usage: $0 {start}"
        exit 1
        ;;
esac

exit 0
-----------------------------------------
For this to work you must change the symbolic links for S99local in
/etc/rc.d/rc[2,3,5].d to  point to ../init.d/local
instead of directly to ../rc.local

The result is more consistent boot display and more
consistent logging to messages.

Wes
Comment 1 Bill Nottingham 2000-03-04 13:01:59 EST
I can't reproduce this here; rc.local is executed normally
on every bootup.

Note You need to log in before you can comment on or make changes to this bug.