update-rc.d not putting in correct sequence numbers

# 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

--

Chris Elvidge, England
Reply to
Chris Elvidge
Loading thread data ...

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.

Reply to
Rob

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

--

Chris Elvidge, England
Reply to
Chris Elvidge

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.

Reply to
Rob

Thanks. I found putting $all in Required-Start starts at the end. Cheers.

--

Chris Elvidge, England
Reply to
Chris Elvidge

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.