Re: How do I register a service?
Camaleón wrote:
> On Mon, 30 May 2011 15:10:55 -0500, lrhorer wrote:
>
>> Camaleón wrote:
>>
>>>>> You mean what's the difference between "$network" and "networking"
>>>>> in LSB parlance?
>>>>
>>>> Nevermind. I found it. I should be using insserv instead of
>>>> update-rc.d
>>>
>>> Ah, that. Yep, "man update-rc.d" should also point to "insserv".
>>>
>>> Greetings,
>>>
>> OK, wait a minute. It should work, but it isn't.
>>
>> Here is pyHME:
>>
>> #! /bin/sh
>> ### BEGIN INIT INFO
>> # Provides: pyHME
>> # Required-Start: $remote_fs $syslog $network $pyTivo
>> # Required-Stop: $remote_fs $syslog $network $pyTivo
>> # Default-Start: 2 3 4 5
>> # Default-Stop: 0 1 6
>> # Short-Description: HME Services
>> # Description: Provides HME services for TiVo
>> #### END INIT INFO
>>
>> but when I run `insserv pyHME` I get:
>>
>> RAID-Server:/etc/rc2.d# ls -1 *py*
>> S04pyHME
>> S04pyTivo
>>
>> That will run pyHME before pyTivo. What am I doing wrong?
>
> Test it and see how it goes.
I had tested it, and it wasn't working. That's why I
posted again.
> Besides, there is more information on "insserv" here:
>
> http://wiki.debian.org/LSBInitScripts
>
> And more specifically the FAQ section:
>
> ***
> Is it possible to specify that a given script should start before
> another script?
>
> There is no such standard-defined header, but there is a proposed
> extention implemented in the insserv package (since version 1.09.0-8).
> Use the X-Start-Before and X-Stop-After headers proposed by SuSe.
> ***
What I wound up doing - that seemed to work - is define
pyTivo as a service in insserv.conf. After I did that,and ran insserv
again, it moved pyHME to S05pyHME. This should be better documented.
Reply to: