Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.raspberry-pi > #9412

Re: update-rc.d not putting in correct sequence numbers

Newsgroups comp.sys.raspberry-pi
From Rob <nomail@example.com>
Subject Re: update-rc.d not putting in correct sequence numbers
References <mq8fni$oqj$1@dont-email.me> <slrnmsgou0.8ja.nomail@xs9.xs4all.nl> <mq9s3r$u86$1@dont-email.me>
Message-ID <slrnmsh2ed.6n5.nomail@xs9.xs4all.nl> (permalink)
Date 2015-08-10 11:23 +0000

Show all headers | View raw


Chris Elvidge <chris@raspberrypi.mshome.net> wrote:
> On 10/08/2015 09:41, Rob wrote:
>> Chris Elvidge <chris@raspberrypi.mshome.net> wrote:
>>> # update-rc.d -n testit defaults 20 10
>>>
>>> insserv: enable service ../init.d/testit -> /etc/init.d/../rc0.d/K01testit
>>> insserv: enable service ../init.d/testit -> /etc/init.d/../rc1.d/K01testit
>>> insserv: enable service ../init.d/testit -> /etc/init.d/../rc2.d/S02testit
>>> insserv: enable service ../init.d/testit -> /etc/init.d/../rc3.d/S02testit
>>> insserv: enable service ../init.d/testit -> /etc/init.d/../rc4.d/S02testit
>>> insserv: enable service ../init.d/testit -> /etc/init.d/../rc5.d/S02testit
>>> insserv: enable service ../init.d/testit -> /etc/init.d/../rc6.d/K01testit
>>> insserv: dryrun, not creating .depend.boot, .depend.start, and .depend.stop
>>>
>>> K01 should be K10, S02 should be S20
>>>
>>> Anyone any ideas?
>>> Cheers
>>
>> Interesting that this is possible (did not know that) and strange that
>> it does not work, but why would you ever want to do it this way??
>>
>> The sequence numbers are supposed to be calculated automatically from
>> the Required-Start and Required-Stop lines in the service script.
>>
> I wrote init.d scripts to start a webserver, written in tcl, that I 
> found when researching tcl and to start the image generator vnstati for 
> vnstatd. These were previously started in rc.local so I wanted them to 
> start later than the default. I also wanted to start kodi later and stop 
> it earlier. Perhaps the man page is out of date. Ubuntu (14.10) doesn't 
> mention the NN facility.
> Cheers

Ok...  it is best to check the existing sequence in rcS.d and rc#.d and
find where you want to start your service (what services you need to
be started before your webserver).
In this case, probably "networking" but maybe some services started
after that.
Put those names in the Required-Start section.
Also specify the runlevels where you want it running.

You can then just use:

insserv servicename

and it will be automatically installed where you want it.

Back to comp.sys.raspberry-pi | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

update-rc.d not putting in correct sequence numbers Chris Elvidge <chris@raspberrypi.mshome.net> - 2015-08-09 22:13 +0100
  Re: update-rc.d not putting in correct sequence numbers Rob <nomail@example.com> - 2015-08-10 08:41 +0000
    Re: update-rc.d not putting in correct sequence numbers Chris Elvidge <chris@raspberrypi.mshome.net> - 2015-08-10 10:51 +0100
      Re: update-rc.d not putting in correct sequence numbers Rob <nomail@example.com> - 2015-08-10 11:23 +0000
        Re: update-rc.d not putting in correct sequence numbers Chris Elvidge <chris@raspberrypi.mshome.net> - 2015-08-10 15:25 +0100

csiph-web