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

"Andraž 'ruskie' Levstik" ruskie at mages.ath.cx
Mon Sep 17 01:41:36 EDT 2007


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
Source Mage GNU/Linux Games grimoire guru
Geek/Hacker/Tinker

Be sure brain is in gear before engaging mouth.

Key id = F4C1F89C
Key fingerprint = 6FF2 8F20 4C9D DB36 B5B6  F134 884D 72CC F4C1 F89C



More information about the SM-Discuss mailing list