[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: customizing scripts /etc/init.d



On Sun, Jun 25, 2006 at 07:06:31PM -0400, cga2000 wrote:
> On Sun, Jun 25, 2006 at 11:52:15AM EDT, Dave Kuhlman wrote:
> > On Sat, Jun 24, 2006 at 02:23:32PM -0400, cga2000 wrote:
> > > Is there a "Debian way" to modify startup scripts?  Changes might
> > > include: deactivating automatic startup of a given daemon.. changing the
> > > daemon's running options.. adding a new script.. etc.
> > > 
> > > Additionally, is the debian bootup process documented anywhere?
> > 
> > Take a look here:
> > 
> >     http://www.debian.org/doc/manuals/reference/ch-system.en.html#s-boot
> 
> Short.. and to the point..! 
> 
> In the meantime I briefly reviewed the scripts and all in all I find the
> way it's done in debian a lot clearer than the way it's done in RedHat.
> 
> As far as I can tell there is really nothing particular about debian.
> If I need to change anything I should edit the scripts.. rename the
> links in /etc/rc?.d/ .. add my stuff to /etc/init.d/ etc. 
> 
> Hopefully my changes won't be overwritten when I upgrade.
> 

Well yes, they might be overwritten.  Hopefully, apt-get will warn
you before doing so.  I don't believe I've modified init scripts
on my Ubuntu/Debian systems, so I don't know whether "apt-get
upgrade" or something similar will over-write them.  But, on my
Gentoo system, I have.  And, they will possibly be replaced,
although Gentoo's package manager (Portage) warned me before doing
so.  In my case, I was able to move my new stuff to a separate
script and then add that new script to the boot process.

I don't know your needs, but if possible, you're best off if you
create a new script of your own, rather than modifying an existing
script, and add your new script to the appropriate run levels.
Debian makes that easy to do.  You probably already found the
following link from the above link, but just in case ...

    http://www.debian.org/doc/debian-policy/ch-opersys#s-sysvinit

This link shows how to use update-rc.d to add your new script to
the default run levels.

Dave


-- 
Dave Kuhlman
http://www.rexx.com/~dkuhlman



Reply to: