LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-04-2002, 12:11 PM   #1
liamtse
LQ Newbie
 
Registered: Jul 2002
Posts: 3

Rep: Reputation: 0
synlink


What I did:

#vi /etc/initd.d/file_abc
then edit something in it.
#ln -s /etc/initd.d/file_abc /etc/rc5.d/Sabc
then reboot.

Then I `ls -l` to list the /etc and /etc/initd.d/. The file_abc and Sabc are flashing in red color! (That mean broken link?). I still can `cat /etc/rc5.d/Sabc` to read the content of file_abc.

I've deleted the softlink Sabc and reboot, still flashing...

What can I do? Thanks!
 
Old 07-04-2002, 12:36 PM   #2
pickledbeans
Member
 
Registered: Jun 2002
Location: Bailey, CO
Distribution: Slackware
Posts: 483

Rep: Reputation: 31
What distro are you using?


ls -l /etc |grep rc

Is /etc/rc5.d a synlink to another directory?
If so you are trying to create a synlink to a synlink
 
Old 07-05-2002, 12:49 PM   #3
liamtse
LQ Newbie
 
Registered: Jul 2002
Posts: 3

Original Poster
Rep: Reputation: 0
In red hat 7.2:

/etc/rc5.d -> /etc/rc.d/rc5.d

Those files in /etc/rc.d/rc5.d are also symlinks too, link to the files in /etc/initd.d/

I created a file in initd.d and made a symlink in /etc/rc.d/rc5.d pointing to it.
 
Old 07-05-2002, 12:57 PM   #4
pickledbeans
Member
 
Registered: Jun 2002
Location: Bailey, CO
Distribution: Slackware
Posts: 483

Rep: Reputation: 31
Bingo!!

RedHat, Mandrake ( everyone except Slack) use
System V style init scripts. RH also add a couple of "enhancements" of it own? RH also has a tool ckconfig to
assist in creating and maintaining init links.
But in general you want a "S" and a "K" script to start
and stop the process.
 
Old 07-05-2002, 01:00 PM   #5
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
well that's not addressing the actual problem is it? they have a working syMlink that is still flashing red yes? they already do have an S at the start, assuming that abc is actually just replacing a number on the post here.
 
Old 07-05-2002, 01:17 PM   #6
pickledbeans
Member
 
Registered: Jun 2002
Location: Bailey, CO
Distribution: Slackware
Posts: 483

Rep: Reputation: 31
Please post the script form /etc/rc/init.d

Are you saying the link in /etc/rc.d/rc5.d in blinking?
If you type /etc/rc.d/rc5.d/SxxName what error do you get?

What is the exact nam of the script in /etc/init.d
and what is the exact name of the "S" link in /etc/rc.d/rc5.d?

Last edited by pickledbeans; 07-05-2002 at 01:42 PM.
 
Old 07-05-2002, 02:02 PM   #7
pickledbeans
Member
 
Registered: Jun 2002
Location: Bailey, CO
Distribution: Slackware
Posts: 483

Rep: Reputation: 31
OOPS, I forgot to ask, do you boot to a graphic login or
a shell login?
 
Old 07-07-2002, 11:42 AM   #8
liamtse
LQ Newbie
 
Registered: Jul 2002
Posts: 3

Original Poster
Rep: Reputation: 0
I add the script:
dhcpcd -k
into:
/etc/init.d/dhcp

I add a link:
ln -s /etc/init.d/dhcp /etc/rc5.d/K78dhcp

I boot to KDE.

That's all I did. What can I do to repair the 'blinking' symlinks? Thanks!
 
Old 07-07-2002, 11:57 AM   #9
pickledbeans
Member
 
Registered: Jun 2002
Location: Bailey, CO
Distribution: Slackware
Posts: 483

Rep: Reputation: 31
First use an existing script in /etc/init.d as a modle. You should have only
one dhcp script and it should contain start:|stop statements, then use
chkconfig to manage init processes here the RH man page:"
http://www.redhat.com/docs/manuals/l...chkconfig.html

A couple of always when writing scripts:
1. Always start scripts with a "shebang" #!/bin/sh or #!/bin/bash
2. Aways use compete path to commands

You could also just put it in rc.local?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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




All times are GMT -5. The time now is 04:13 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration