简体   繁体   English

update-rc.d默认设置运行级别吗?

[英]update-rc.d defaults setting up runlevels?

Reading update-rc.d manpage: 阅读update-rc.d联机帮助页:

update-rc.d requires dependency and runlevel information to be provided in the init.d script LSB comment header of all init.d scripts. update-rc.d要求在所有init.d脚本的init.d脚本LSB注释标头中提供依赖项和运行级别信息。

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 1)创建/etc/rcrunlevel.d/99name链接
2) pointed at /etc/init.d/foo 2)指向/etc/init.d/foo

I am not sure about the purpose of 10, does it really represent runlevel? 我不确定10的目的,它真的代表运行级别吗? In which case, does it mean foo can run administrative tasks(single user mode) and can shut down the system (halt) 在这种情况下,这是否意味着foo可以运行管理任务(单用户模式)并可以关闭系统(停止)

*NN - is a dependency as in LSB comment header, aka sequence number (1-99) * NN-与LSB注释标头中的依赖项一样,即序列号(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] [NN | SS KK] is means you may either provide a single number, NN , or two numbers, SS and KK . [NN | SS KK]是表示可以要么提供一个单个数字,NN, 两个数字,SSKK。

In your case, you are providing two separate numbers, so SS is 99 and KK is 10 . 在您的情况下,您要提供两个单独的数字,因此SS99KK10 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. 第一个NN参数提供起始序列号,第二个NN参数提供终止序列号。

So you have provided a start-sequence number of 99 and a kill-sequence number of 10. 因此,您提供了99的起始序列号和10的终止序列号。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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