0

Reading update-rc.d manpage:

update-rc.d requires dependency and runlevel information to be provided in the init.d script LSB comment header of all init.d scripts.

Am i correct in interpreting below command as follows:

update-rc.d    foo[name]     defaults     99[NN]*     10[runlevel]

I understand above will result in:

1) /etc/rcrunlevel.d/99name link created
2) pointed at /etc/init.d/foo

I am not sure about the purpose of 10, does it really represent runlevel? In which case, does it mean foo can run administrative tasks(single user mode) and can shut down the system (halt)

*NN - is a dependency as in LSB comment header, a.k.a sequence number (1-99)

Kyle Strand
  • 15,941
  • 8
  • 72
  • 167
gaukhar
  • 182
  • 2
  • 14
  • There is no `10` runlevel; the levels are 0-6. The usage you've cited is neither directly copied from the man page nor an actual valid `update-rc.d` command (since you've included `[]` and `*`), which is a bit confusing. – Kyle Strand Feb 23 '16 at 18:59

1 Answers1

1

You are presumably referring to the following usage-line in the manpage:

update-rc.d [-n] name defaults [NN | SS KK]

Here, [NN | SS KK] is means you may either provide a single number, NN, or two numbers, SS and KK.

In your case, you are providing two separate numbers, so SS is 99 and KK is 10. Neither of these has anything to do with the run-level; in fact they are both sequence numbers.

Here is the relevant quote from the man page:

The first NN argument supplies the start sequence number and the second NN argument supplies the kill sequence number.

So you have provided a start-sequence number of 99 and a kill-sequence number of 10.

Kyle Strand
  • 15,941
  • 8
  • 72
  • 167