简体   繁体   中英

update-rc.d defaults setting up runlevels?

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, aka sequence number (1-99)

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] [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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM