WHAT's That Supposed to Mean?? (/etc/rc5.d \ Startup Question)
Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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>?
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;
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.
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...
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.
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.
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.
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
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!
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.