In RHEL 6,
/etc/rc.d/init.d/ is the actual location of the SysVinit-style startup/shutdown scripts.
/etc/init.d is a symbolic link to it.
/etc/rc.d/rc[0-6].d directories should only contain symbolic links pointing to scripts in
/etc/rc.d/init.d/. There is also a set of symbolic links at
/etc/rc[0-6].d pointing to the respective directories in
The best option would be to recover these directories from a backup that was originally taken from the same server, as it ensures that you will have the exact same configuration as before.
But if you have multiple servers configured the same way (= the same RPMs installed, the same services running), then you could have pretty good (but not necessarily perfect) results by copying the directories.
I would definitely suggest copying
/etc/rc.d/rc.sysinit from the other server first, as they are likely to be unchanged between servers. Without these scripts, the server will certainly crash to single user mode very early in the boot process, which may make further repairs more inconvenient.
/etc/rc.d/rc.local might or might not be modified by your local administrators; by default it does nothing, but it's better to have it exist. So copy it too, but if it has non-default contents, make sure the content is applicable.
You could then copy the contents of
/etc/rc.d/init.d from a server that is configured the same as the damaged system, then use these commands to restore the default symbolic links for the scripts:
for i in *; do chkconfig --add $i; done
This will restore the factory default enabled/disabled configuration of various services; after this, you should run
chkconfig --list on both the damaged server and on the other identically-configured server, and use
chkconfig <service name> on /
chkconfig <service name> off commands to adjust the enabled/disabled state of various services to match what the other identically-configured server actually has (or whatever makes sense regarding the damaged server's purpose, if the other server is not exactly identical).
You can then use
rpm -Va | grep /etc/rc.d/init.d to verify that all the scripts for software installed from RPMs are present. It will list any scripts that are missing or modified from their default state as delivered within the RPMs. If some scripts are missing,
yum reinstall <package name> might be an easy way to fix them.
If you have some third-party software that is not installed from RPM packages, you will need to review their installation instructions and check if they have start-up scripts that will have to be replaced manually.