Skip to Content.
Sympa Menu

sm-discuss - Re: [SM-Discuss] [SM_Discuss] How to write spells that require initial scripts under init.d

sm-discuss AT lists.ibiblio.org

Subject: Public SourceMage Discussion List

List archive

Chronological Thread  
  • From: "Javier Vasquez" <jevv.cr AT gmail.com>
  • To: "Andraž 'ruskie' Levstik" <ruskie AT mages.ath.cx>
  • Cc: sm-discuss AT lists.ibiblio.org
  • Subject: Re: [SM-Discuss] [SM_Discuss] How to write spells that require initial scripts under init.d
  • Date: Mon, 17 Sep 2007 08:16:00 -0600

On 9/16/07, "Andraž 'ruskie' Levstik" <ruskie AT mages.ath.cx> wrote:
> On 07:34:26 2007-09-17 "Javier Vasquez" <jevv.cr AT gmail.com> wrote:
> > Hi,
> >
> > I'm trying to write some personal spells, but the only thing
> > preventing further progress is the fact that one of them require 2
> > daemon scripts to be included in /etc/init.d/runlevels/%S. Well I
> > think that should be the right place although I might be wrong... The
> > others require as well 1 script to be included there as well
> >
> > Copying the scripts in the expected place doesn't seem to do the magic
> > since I can call them manually by
> > "/etc/init.d/runlevels/%S/<my_script> start" for example, but when
> > rebooting the machine I don't see the daemons getting called and when
> > looking for the processes, I don't find them...
> >
> > There must be some procedure to do this, but the spell writing for
> > dumies doesn't help me... Can some one point out how to do this,
> > specially when there's more than one script per spell to be included?
> >
>
> Put the init scrips into(this will ensure they are installed automaticaly
> during casting(if you specify so)):
> $SPELLDIR/init.d
>
> And make sure the init scripts conform to our system i.e.:
> added the following variables into them:
> PROGRAM=/foo/bar/baz
> RUNLEVEL=[one of S, 0, 1, 2, 3, 4, 5, 6, DEV]
> Next only needed if it has any dependencies...
> NEEDS=
>
>
> This is more or less the official way...
>
>
> --
> Andraž "ruskie" Levstik

So one option, following your comment, implies that I should extract
from the tarball the script and place it under the spell directory,
and besides modify it to comply... modutils might be an example
maybe...

I saw the acpid example, and although I didn't understand it pretty
well, it seems like another option is to place the scripts somewhere
else and call them through the one placed in the spell under init.d...
This although looking +/- simple, might not be suitable all the time,
specially when the application installs a binary in the common place
for binaries, and besides a script with the same name under init.d,
then a name change or something needs to apply in order for everything
to work... Well, I'll try with this 2nd option and see how it goes...

Thanks,

--
Javier




Archive powered by MHonArc 2.6.24.

Top of Page