If you want a service to start at boot then you put a startup file in /etc/rc.d/init.d Do not touch files in /etc/rc.d/rc5.d or the other locations. They are maintained automatically by chkconfig.
If you look at the headers of files in /etc/rc.d/init.d you will see they all have a common format like this
- Code: Select all
#!/bin/sh
#
# Startup script for dansguardian
#
# chkconfig: 345 92 8
This means it will run in run levels 3 (text only with networking), 4 (I forget what run level 4 is), and 5 (graphics with networking) It will start at position 92 (near the end), and shutdown at position 8.
Running the command
- Code: Select all
chkconfig startupfilename on
will automatically cause copies of the file to appear in the correct directories
- Code: Select all
chkconfig startupfilename off
will remove them again.
See 'man chkconfig'
As it happens you will see there is already a file called /etc/rc.d/rc.5/S99rc-local which is a symlink to /etc/rc-local
This file is there for you to modify to add any applications you want to start at boot time.
If you want an application to start as a user when they log in then put a .desktop file in /etc/xdg/autostart. (independent of which desktop you are using), or else use the method defined for your desktop.