That seems odd, cleanlinks should only delete symlinks that point to non-existent files.
I haven't used an RH system in a while, but I assume they still use chkconfig. If so, you can regenerate the symlinks by runnning
on each file in /etc/init.d.
This script should do it (run as root):
Code:
#!/bin/sh
cd /etc/init.d
for i in *
do
chkconfig --add $i
done
Or you can just run it from a command line.
Each file in /etc/init.d has (or should have) a magic line that tells it what rc?.d directories to make links in:
Code:
# chkconfig: 2345 20 80
This says the service should be started in runlevels 2, 3, 4, and 5, with a start priority of 20 and a stop priority of 80. The priorities determine what order services are started or stopped at within a runlevel -- you want to make sure you start the network before you start httpd, for example.