Gentoo:rc-update
From Linux 101, The beginner's guide to all things Linux.
[edit] What is rc-update?
rc-update is a root only script which allows for the addition, removal, and listing of startup scripts on your Gentoo Linux system.
[edit] How is rc-update useful?
rc-update is one of the main ways Gentoo deals with starting programs on boot. It has, by default although more may be added by the user, three runlevels: default, boot, and nonetwork. For instance, if you wished to start your login manager you would use rc-update to add the login manager's script to the default runlevel.
[edit] How does rc-update work?
rc-update has three parameters associated with it: add (-a), del (-d), and show (-s). In order to add something to a certain runlevel, such as the above example of a login manager (in this case gdm) the following command would be issued:
- #
rc-update add gdm default
The first parameter of "add" tells rc-update that you wish to put a program into the runlevel, "gdm" tells rc-update which script will be added, and "default" is the runlevel you are adding to. If you accidentally add something to start when you didn't mean to, or you simply don't want it to start on boot any longer, simply switch the "add" out for "del" like so:
- #
rc-update del gdm default
This will remove gdm from the default runlevel and stop it from loading on startup.
|
Note: If you do not specify a runlevel, rc-update will remove the selected script from all runlevels it finds it in. |
The final parameter, show, will show which scripts are available for use with rc-update (you may also simply look in /etc/init.d/) and also what runlevel(s) they are currently set to, if any.
- #
rc-update show
apache2 | default
bootmisc | boot
checkfs | boot
checkroot | boot
clock | boot
consolefont | boot
hostname | boot
keymaps | boot
local | default nonetwork
localmount | boot
metalog | default
modules | boot
mysql | default
net.eth0 | default
net.lo | boot
netmount | default
rmnologin | boot
samba | default
serial | boot
sshd | default
urandom | boot
vixie-cron | default
| Navigation: Gentoo Index |

