JustAnswer.com

Friday, November 23, 2007

Linux boots

Linux boots


You can start one of these services by hand. For example, if you want to start
the httpd Web server program manually, run S99httpd start. Similarly,
if you ever need to kill one of the services whe

the machine is on, you can run the command in the rc*.d directory
with the stop argument (S99httpd stop, for instance).

Some rc*.d directories contain commands that start with K (for "kill," or stop mode).
In this case, rc runs the command with the stop argument instead of start.
You are most likely to encounter K commands in runlevels that shut the system down.

Adding and removing services

If you want to add, delete, or modify services in the rc*.d directories, you
need to take a closer look at the files inside. A long listing reveals a structure like this:

lrwxrwxrwx . . . S10sysklogd -> ../init.d/sysklogd lrwxrwxrwx . . . S12kerneld -> ../init.d/kerneld
lrwxrwxrwx . . . S15netstd_init -> ../init.d/netstd_init lrwxrwxrwx . . . S18netbase -> ../init.d/netbase ...





To prevent one of the commands in the init.d directory from running in a particular runlevel,
you might think of removing the symbolic link in the appropriate rc*.d directory. This does work, but i

you make a mistake and ever need to put the link back in place, you might have trouble
remembering the exact name of the link. Therefore, you shouldn't remove links in the rc*.d
directories, but rather, add an underscore (_) to the beginning of the link name like this:

mv S99httpd _S99httpd

At boot time, rc ignores _S99httpd because it doesn't start with S or K. Furthermore,
the original name is still obvious, and you have quick access to the command if you're in a pinch and need to start it by hand.

1 comment:

Akulkis said...

Fuck off, and quit spamming mailing lists, you asshole.