LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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-08-2005, 02:29 PM   #1
Rajns
LQ Newbie
 
Registered: Apr 2005
Location: India
Posts: 2

Rep: Reputation: 0
Lost all my rc.d links by cleanlinks cmd


Hi grp

I installed RH WS 9 on my box and somehow i used cleanlinks to remove the symlinks ... but i ruined my days to come ...

all the links for the different rc.d (at all levels ) are missing ...now i dont know wot is missing .... so that i can replace them

Is there any solution is there any collection of rc.*.script for remaking theese files?

If not , can some1 send me all the files in a ziped format ...

Raj
 
Old 04-09-2005, 07:11 AM   #2
grapes
LQ Newbie
 
Registered: Nov 2004
Location: Chicago, IL
Distribution: Mandrake 10.1 Official
Posts: 2

Rep: Reputation: 0
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

Code:
chkconfig --add
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.

Last edited by grapes; 04-09-2005 at 07:22 AM.
 
  


Reply



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
cmd to resolve symbolic links ttilt Linux - Software 3 08-01-2010 08:17 AM
links (hard links and soft links..) sachitha Programming 1 08-10-2005 12:10 PM
Home Alone with PHP, part 2: Lost in links! Mega Man X Programming 13 09-11-2004 06:52 AM
how to change relitive links to specific links? wolfe2554 Linux - General 4 07-03-2004 12:40 AM
Links Section updated - Please add your Linux links. jeremy Linux - General 2 11-24-2001 11:35 AM

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

All times are GMT -5. The time now is 08:11 PM.

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