The difference between /etc/init.d/progname start and progname start

Albin Blaschka albin.blaschka at sbg.ac.at
Fri Feb 18 08:02:59 UTC 2005


Behrang Saeedzadeh schrieb:
 > On Thu, 17 Feb 2005 08:14:24 -0500, Kirtis Bakalarczyk
 > <kirtis.bakalarczyk at gmail.com> wrote:
 >
 >>/etc/init.d/prognam is used to start daemons -- that is, programs that
 >>run in the background and provide a service, like a web server, or
 >>email server, etc. The files in /etc/init.d/ are scripts that take
 >>care of most of the details of starting and stopping these services,
 >>including running the actual program that provides the service.

Hello,

with the init.d-thing, the daemon is started automatically during 
start-up, if you look for an exact expanation, the word is sys V init 
and different runlevel (http://en.wikipedia.org/wiki/Runlevel)
If you look in /etc, you'll find directories rc0.d, rc1.d until rc6.d 
(hope that's right, it's from memory...Iam not in front of my ubuntu 
right now). in this directories there are various scripts that control 
system-startup and shutdown.

To get a daemon included in this system, you need a start/stop 
bash-script (most daemons bring one, for apache 1.x it is apachectl for 
example, for postgres it is pg_ctl - see the 'ctl' part - 'control'...) 
and the console ;-)
The command is (sudo) update-rc.d <name-of-script> defaults
update-rc.d --help gives a short help
man update-rc.d gives more help ;-)

http://www.redhat.com/docs/manuals/linux/RHL-9-Manual/ref-guide/s1-boot-init-shutdown-sysv.html
(this ones for redhat, but as linux as a whole inherited the sys-init 
system from System V UNIX, it should be "useable"... ;)

HTH,

Albin






More information about the ubuntu-users mailing list