Re: prog. end of the boot ? rc.local
Christopher Swingley <[EMAIL PROTECTED]> writes: > > Debian uses the /etc/rc0.d -> /etc/rc6.d folders for links to actual > scripts in /etc/init.d. When the boot process reaches a particular run > level (say level 2), it processes all the links in the /etc/rc2.d > directory, in order. If the link starts with a K then it executes the > link with the stop parameter (meaning it runs the same scripts in ../init.d > with stop). If the link starts with an S then it sends the option start. > If you look at the actual scripts in /etc/init.d you can see that they > use case logic based on the option passed to decide whether to start > or stop daemons. In general, rc0.d, rc1.d and rc6.d contain largely K > links because these are the run levels for shutting down the system or > rebooting it. rc2 - rc5 are the run levels where stuff gets started. > > So, to answer your question, the way I stop the crap from running is > to either uninstall the package, or simply change the name of each link > so that it starts with DISABLE instead of K or S. When the system is > booting, or shutting down, it ignores all links that don't start with K > or S, so this effectively disables the daemon without removing the > script or the binary in case you want to run it later. You'll have to > either figure out what your run levels are, or just move all the links > in the directories rc0 - rc6. > > To start a new service, or do something that you would have done in > rc.local in RedHat, write a script that knows about start and stop, > put it into /etc/init.d, and then link it with a K or and S in all > the rc directories. You can decide where your script will run by > choosing the number appropriately. (i.e. if you compiled Apache > yourself and want it to run, you should probably make the script link > such that it starts after your network initialization scripts or > it might hang. If you look at the way the rc directories are ordered, > you'll see what I mean. See man update-rc.d to learn how to manipulate the symlinks in rc?.d more easily. Manipulating them by hand is a pain. Bob -- _ |_) _ |_ Robert D. Hilliard<[EMAIL PROTECTED]> |_) (_) |_) Palm City, FL USAPGP Key ID: A8E40EB9
Re: prog. end of the boot ? rc.local
Christopher Swingley writes: > So, to answer your question, the way I stop the crap from running is > to either uninstall the package, or simply change the name of each link > so that it starts with DISABLE instead of K or S. You're doing this the hard way. man update-rc.d. > To start a new service, or do something that you would have done in > rc.local in RedHat, write a script that knows about start and stop, put > it into /etc/init.d,... Copy /etc/init.d/skeleton and edit it. That's what it's there for. > ...and then link it with a K or and S in all the rc directories. You can > decide where your script will run by choosing the number appropriately. Again, man update-rc.d. -- John HaslerThis posting is in the public domain. [EMAIL PROTECTED] Do with it what you will. Dancing Horse Hill Make money from it if you can; I don't mind. Elmwood, Wisconsin Do not send email advertisements to this address.
Re: prog. end of the boot ? rc.local
*- On 2 Apr, Christopher Swingley wrote about "Re: prog. end of the boot ? rc.local" > [excellent narrative of startup scripts] > > There is one last directory named /etc/rc.boot that has a couple scripts > in it that run when the system first comes up. I've never messed with > it, but it's there for the fooling with. > Actually /etc/rc.boot is now considered obsolete and is replaced by /etc/rcS.d, see the man page for rc.boot and the README in /etc/rcS.d/ -- Brian - "Never criticize anybody until you have walked a mile in their shoes, because by that time you will be a mile away and have their shoes." - unknown Mechanical Engineering[EMAIL PROTECTED] Purdue University http://www.ecn.purdue.edu/~servis -
Re: prog. end of the boot ? rc.local
Debian uses the /etc/rc0.d -> /etc/rc6.d folders for links to actual scripts in /etc/init.d. When the boot process reaches a particular run level (say level 2), it processes all the links in the /etc/rc2.d directory, in order. If the link starts with a K then it executes the link with the stop parameter (meaning it runs the same scripts in ../init.d with stop). If the link starts with an S then it sends the option start. If you look at the actual scripts in /etc/init.d you can see that they use case logic based on the option passed to decide whether to start or stop daemons. In general, rc0.d, rc1.d and rc6.d contain largely K links because these are the run levels for shutting down the system or rebooting it. rc2 - rc5 are the run levels where stuff gets started. So, to answer your question, the way I stop the crap from running is to either uninstall the package, or simply change the name of each link so that it starts with DISABLE instead of K or S. When the system is booting, or shutting down, it ignores all links that don't start with K or S, so this effectively disables the daemon without removing the script or the binary in case you want to run it later. You'll have to either figure out what your run levels are, or just move all the links in the directories rc0 - rc6. To start a new service, or do something that you would have done in rc.local in RedHat, write a script that knows about start and stop, put it into /etc/init.d, and then link it with a K or and S in all the rc directories. You can decide where your script will run by choosing the number appropriately. (i.e. if you compiled Apache yourself and want it to run, you should probably make the script link such that it starts after your network initialization scripts or it might hang. If you look at the way the rc directories are ordered, you'll see what I mean. There is one last directory named /etc/rc.boot that has a couple scripts in it that run when the system first comes up. I've never messed with it, but it's there for the fooling with. Hope this helps. Chris -- ++--+ | Christopher S. Swingley| 108 O'Neill Building --x7092 | | Programmer / Analyst | 940 Sheep Creek Rd -- 479-9729 | | IARC - Frontier| [EMAIL PROTECTED] (email) | | University of Alaska Fairbanks | www.frontier.iarc.uaf.edu:8080/ | | Fairbanks, AK 99775 |~cswingle (web) | ++--+ Quoting Attila Csosz <[EMAIL PROTECTED]>: > I'd like to start a program at the end of the boot, where to should I put > it? ( under redhat was rc.local ) > Where could I study the debian boot sequence? ( doc, links? ) > > How could I eliminate squid and apache daemons? ( they are started at boot ) > > Thanks > Attila > > Debian 2.1/2.0.36 > > > > > > > > -- > Unsubscribe? mail -s unsubscribe [EMAIL PROTECTED] < /dev/null >
prog. end of the boot ? rc.local
I'd like to start a program at the end of the boot, where to should I put it? ( under redhat was rc.local ) Where could I study the debian boot sequence? ( doc, links? ) How could I eliminate squid and apache daemons? ( they are started at boot ) Thanks Attila Debian 2.1/2.0.36