LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 03-10-2009, 11:26 AM   #1
Matey
Member
 
Registered: Jan 2009
Posts: 114

Rep: Reputation: 17
Question WHAT's That Supposed to Mean?? (/etc/rc5.d \ Startup Question)


I was trying to disable this script (ntpd)from starting up (as a daemon) every time and run it when I want to but then I started to read the README file and got more confused.
It says:

"To disable a service in this runlevel, rename its script in this directory
so that the new name begins with a 'K' and a two-digit number, where the
number is the difference between the two-digit number following the 'S'
in its current name, and 100. To re-enable the service, rename the script
back to its original name beginning with 'S'
.
"


what??

OK I got the 1st part and I did that but:\

"and a two-digit number, where the
number is the difference between the two-digit number following the 'S'
in its current name, and 100. "


wth is this supposed to mean?
I mean OK let's say I got this file (link) S90reboot,
so I take 90 from 100 and I get 10 so what am I supposed to do with it>?

anyone want to take a WAG at it?

Last edited by Matey; 03-10-2009 at 11:28 AM.
 
Old 03-10-2009, 11:50 AM   #2
akuthia
Member
 
Registered: Oct 2007
Location: triad, nc, usa
Distribution: Ubuntu
Posts: 232

Rep: Reputation: 29
im guessing you rename (that) file to "k10reboot"
 
Old 03-10-2009, 12:02 PM   #3
Matey
Member
 
Registered: Jan 2009
Posts: 114

Original Poster
Rep: Reputation: 17
Quote:
Originally Posted by akuthia View Post
im guessing you rename (that) file to "k10reboot"
thanks that is what I thought and did. I guess I'll find out the next time I reboot this machine.
I am almost sure that will take care of it .
regards;
 
Old 03-10-2009, 12:09 PM   #4
openSauce
Member
 
Registered: Oct 2007
Distribution: Fedora, openSUSE
Posts: 252

Rep: Reputation: 39
Note that the readme is telling you to use K, not k, don't know if it'll make a difference.

Where did you find that readme? My sendmail is broken at the moment so I've just disabled it by renaming the script itself (not the links) to sendmail-is-broken, which seems to work fine.
 
Old 03-10-2009, 12:39 PM   #5
akuthia
Member
 
Registered: Oct 2007
Location: triad, nc, usa
Distribution: Ubuntu
Posts: 232

Rep: Reputation: 29
i suspect you'd be able to rename the file to pretty much anything you please, i'd guess documentation would tell you to rename it to something specific like this for ease of restoring with one of those fancy renaming tricks you can do...
 
Old 03-10-2009, 12:51 PM   #6
Hobbletoe
Member
 
Registered: Sep 2004
Location: Dayton, Oh
Distribution: Linux Mint 17
Posts: 150

Rep: Reputation: 18
When your system first starts up, it enters a run level between 1 and 5. 5 is standard for most Linux Desktops I do believe. So, you system goes into the /etc/rc5.d dirctory and starts running all of the S scripts in there. The two numbers that appear next control the order that they run in. S00whatever is first, followed by S01somethingelse ... If you find something that you don't want to run at startup, you go to the /etc/rc5.d directory and change say S01somethingelse to s01somethingelse. When shutting down, or switching run levels, it does the same thing, only it uses the K files to shutdown. Note that most (if not all) of your S and K files are actually soft links to the /etc/init.d directory. This is done because you could want to start/stop a process in more than one run level, and it is easier to correct the one file than 5 separate files.

Hope this helps.
 
Old 03-10-2009, 01:00 PM   #7
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
Matey, you aren't telling us your distro, but I start & stop various daemons through the GUI.
Kubuntu calls the GUI for controlling these (start, stop, "start at boot" etc.) "System Services", and it is pathetically easy to use.
 
Old 03-10-2009, 01:45 PM   #8
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,187

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
There is also the chkconfig command that can be used to change the services to be started at each run level.

As to your specific question, if the service in question is, say "S58ntpd," then you would change it to "K42ntpd" since (100 - 58) = 42. (I.e., sudo mv /etc/rc.d/rc5.d/S58ntpd /etc/rc.d/rc5.d/K42ntpd)

Last edited by PTrenholme; 03-10-2009 at 02:03 PM.
 
Old 03-11-2009, 05:41 AM   #9
Matey
Member
 
Registered: Jan 2009
Posts: 114

Original Poster
Rep: Reputation: 17
Sorry I guess I should have given more info.
My dist is Ubuntu Hardy 8.04 with xdm GUI
The README file was in /etc/rc6.d not in rc5.d but since it was general , I took the advice. There was no readme files in rc5.d at all.
All these files in these folders (/etc/rc1.d thru rc6.d for me) are Links to files in the /etc/init.d directory.
All those files in init.d are executable scripts .
I could move the scipts but did not want to mess with them really.




Quote:
Originally Posted by tredegar View Post
Matey, you aren't telling us your distro, but I start & stop various daemons through the GUI.
Kubuntu calls the GUI for controlling these (start, stop, "start at boot" etc.) "System Services", and it is pathetically easy to use.
I did not know that. I use my GUI for surfing* and couple of other things,
I Use the terminal to learn things. But I will check it out. sounds like much easier task. Thanks.

Regards;

*speaking of surfing, I used to be happy using LYNX lol
that was long ago...before mosaic (netscape)
But I am not ashamed to say I dont know!

Last edited by Matey; 03-11-2009 at 05:43 AM.
 
Old 03-11-2009, 06:46 AM   #10
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,362

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Its easier to use the GUI or chkconfig, but ntpd is pretty important. Are you sure you don't want it running?
Another option is to just rename the script in /etc/init.d to eg ntpd.bak and substitute a simple one-line bash 'exit 0' for the original name.
 
Old 03-11-2009, 07:03 AM   #11
Matey
Member
 
Registered: Jan 2009
Posts: 114

Original Poster
Rep: Reputation: 17
Quote:
Originally Posted by chrism01 View Post
Its easier to use the GUI or chkconfig, but ntpd is pretty important. Are you sure you don't want it running?
Another option is to just rename the script in /etc/init.d to eg ntpd.bak and substitute a simple one-line bash 'exit 0' for the original name.
well it was (so I heard) interfering with the main time server?!
and since I had to install it before (it was not on the server already) I decided to take it out of start up, but kept the files.

BTW Yes it was all caps (S and K)!
thnks.
 
  


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
Am i supposed to edit xinitrc to run a command at startup? Tyir Linux - General 36 12-05-2007 12:57 PM
Link in rc5.d is not executing -- is there a startup log? dcroxton Linux - General 2 01-28-2007 09:08 PM
2.6.15-rc5 compile problem just-hatched Ubuntu 2 12-14-2005 02:43 PM
What startup script is dhcpcd supposed to be in? murray_linux Slackware 8 06-29-2004 05:27 PM
Confused by RC.D, RC5.D etc sx10 Linux - General 3 02-06-2003 04:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:01 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