On Mon, 17 Feb 2003, George Gambill wrote:
> RedHat 8.0
>
> can start the service from the command line but I need to start it at boot
> time before anyone logs in.
>
> There must be a file somewhere (like a .conf) that will allow me to add the
> commands required. As usual, if I am going strange here (as in "don't do
> this in the real world"), please let me know. However, at the moment, this
> is for demonstration (not real world) purposes only.
Have a look at the chkconfig(8) and ntsysv(8) commands.
Try running "ntsysv" -- it gives a simple newt-based menu for configuring
services to start at run time.
Or chkconfig can be used on the command line, like:
chkconfig vncserver on
Have a look at:
ls -l /etc/*/*vncserver
Notice the symlinks starting with "S" are for starting. The "K" symlinks
are for stopping (shutdown). (The real scripts are under /etc/init.d/.)
This is called the System V startup scripts.
Run "runlevel" to see your current runlevel. That is the rc.d directory
for scripts to start up services. Also see /etc/inittab for choosing the
runlevel. Try: "grep initdefault /etc/inittab".
You may be interested in my article from a couple years ago at
http://www.serverwatch.com/news/article.php/1133271
(On a related note, the *BSDs provide a single rc.conf file that can be
used to enable services to start at run-time. I am helping develop a new
Linux distro that uses the easy-to-use BSD rc.conf and rcorder(8)-style
startup.)
Jeremy C. Reed
http://www.pugetsoundtechnology.com/