Modifies the permission, which must be in the **0****<i>xxx</i>** format. **chmod**, <i>permission</i>, and <i>target</i> must be separated by only one space.
Modifies the permission, which must be in the <strong>0</strong><i>xxx</i> format. <strong>chmod</strong>, <i>permission</i>, and <i>target</i> must be separated by only one space.
Mounts devices. Every two parameters must be separated by only one space. <br>For details about **flags**, see the **mountFlagMap[]** array of the **mountFlagMap** function in **base/startup/init_lite/services/init/init_common_cmds.c**. The **data** field is optional.
Mounts devices. Every two parameters must be separated by only one space. <br>For details about <strong>flags</strong>, see the <strong>mountFlagMap[]</strong> array of the <strong>mountFlagMap</strong> function in <strong>base/startup/init_lite/services/init/init_common_cmds.c</strong>. The <strong>data</strong> field is optional.
Resets a service. **servicename** indicates the name of the service to reset. If the service has not been started, this command will start the service. If the service is running, the command will stop the service and then restart it.
Resets a service. <i>servicename</i> indicates the name of the service to reset. If the service has not been started, this command will start the service. If the service is running, the command will stop the service and then restart it.
Restarts the system. <strong>subsystem</strong> is optional. If it is not specified, the device enters the current system upon restarting. If it is specified, the device enters the corresponding subsystem upon restarting. For example, if you run **reboot updater**, the device enters the updater subsystem upon restarting.
Restarts the system. <strong>subsystem</strong> is optional. If it is not specified, the device enters the current system upon restarting. If it is specified, the device enters the corresponding subsystem upon restarting. For example, if you run <strong>reboot updater</strong>, the device enters the updater subsystem upon restarting.
Sets resource usage restrictions. <br>For details, see the **resource[]** array of the **DoSetrlimit** function in **base/startup/init_lite/services/init/init_common_cmds.c**.
Sets resource usage restrictions. <br>For details, see the <strong>resource[]</strong> array of the <strong>DoSetrlimit</strong> function in <strong>base/startup/init_lite/services/init/init_common_cmds.c</strong>.
Writes the access token to the **data/service/el0/access_token/nativetoken.json** file. There is one and only one space after **load_access_token_id**.
Writes the access token to the <strong>data/service/el0/access_token/nativetoken.json</strong> file. There is one and only one space after <strong>load_access_token_id</strong>.
Loads other **.cfg** files. The maximum size of the target file (only **/patch/fstab.cfg** supported currently) is 50 KB. Each line in the /patch/fstab.cfg file is a command. The command types and formats must comply with their respective requirements mentioned in this table. A maximum of 20 commands are allowed.
Loads other <strong>.cfg</strong> files. The maximum size of the target file (only <strong>/patch/fstab.cfg</strong> supported currently) is 50 KB. Each line in the <strong>/patch/fstab.cfg</strong> file is a command. The command types and formats must comply with their respective requirements mentioned in this table. A maximum of 20 commands are allowed.
Parses **cmds** in the job. This API is used for the small system. It does not apply to the standard system because the **trigger** command and **condition** attribute are involved.
Parses <strong>cmds</strong> in the job. This API is used for the small system. It does not apply to the standard system because the <strong>trigger</strong> command and <strong>condition</strong> attribute are involved.
Obtains the job name, condition attribute, and **cmds** command group. Jobs are stored in a hash table, and commands are stored in a queue structure.
Obtains the job name, condition attribute, and <strong>cmds</strong> command group. Jobs are stored in a hash table, and commands are stored in a queue structure.
@@ -876,7 +876,7 @@ Job management is a part of the init startup process. It is a process-based func
</table>
### Development Example
The following is the template for configuring **jobs** in the **.cfg** file. You can use it to verify the job management function.
The following is the template for configuring <strong>jobs</strong> in the <strong>.cfg</strong> file. You can use it to verify the job management function.
```
{
"jobs" : [{ // Basic job
...
...
@@ -905,16 +905,16 @@ The following is the template for configuring **jobs** in the **.cfg** file. You
```
The differences in job configuration are described as follows:
1.**name** and **cmds** are mandatory for a job, and **cmds** must contain commands supported by the system.
1.<strong>name</strong> and <strong>cmds</strong> are mandatory for a job, and <strong>cmds</strong> must contain commands supported by the system.
2.**condition** is an optional attribute of a job. It indicates that the job is triggered only when the specified condition is met; that is, the job will not be invoked in a specific phase by the code or the **trigger** command.
2.<strong>condition</strong> is an optional attribute of a job. It indicates that the job is triggered only when the specified condition is met; that is, the job will not be invoked in a specific phase by the code or the <strong>trigger</strong> command.
3. The job name must comply with the specified rules. For a job whose condition is a system parameter, its name is prefixed with **param:**.
3. The job name must comply with the specified rules. For a job whose condition is a system parameter, its name is prefixed with <strong>param:</strong>.
4. Commands in a renamed job can be executed only after being triggered by the **trigger** command in other executable job command groups. By default, the **trigger** command is executed in the post-init phase.
4. Commands in a renamed job can be executed only after being triggered by the <strong>trigger</strong> command in other executable job command groups. By default, the <strong>trigger</strong> command is executed in the post-init phase.
5. An existing job name can be used in different files. Jobs with the same name are regarded as the same job. When jobs with the same name are executed, the commands in these jobs are executed together.
6. For a conditional job, a condition is usually a system parameter. You can set a specific value so that the job is triggered when the condition is met. You can also set the value to an asterisk (*) so that the job is triggered whenever the condition is met, regardless of the parameter value.
7. For the small system, the commands in a job cannot be triggered by the **trigger** command in the post-init phase.
7. For the small system, the commands in a job cannot be triggered by the <strong>trigger</strong> command in the post-init phase.
@@ -26,10 +26,10 @@ Figure 1 System parameter operation primitives
**Table 2** System parameter names
| Type| Name| Example| Description|
| -------- | -------- | -------- | -------- |
| Name| Parameter Name | const.product.**name** | Complete system parameter name. It does not end with a period (.). |
| Directory| Parameter Directory | const.product **.** | Name of the directory storing system parameters with the same prefix. It ends with a period (.).|
| Type| Example| Description|
| -------- | -------- | -------- |
| Parameter name | const.product.**name** | Complete system parameter name. It does not end with a period (.). |
| Parameter directory | const.product **.** | Name of the directory storing system parameters with the same prefix. It ends with a period (.).|