diff --git a/README.md b/README.md index 9b48cc0..ae62146 100755 --- a/README.md +++ b/README.md @@ -20,13 +20,13 @@ The sample code for importing the start module is as follows: ``` ## Usage -The repository places the startup file of the hsensors process to start sensor and small device services such as vibrator. Sensor and small device services such as vibrator share the hsensors process.
-Service code for sensor and small device services such as vibrator is [sensors\_sensor](https://gitee.com/openharmony/sensors_sensor) and [sensors\_miscdevice](https://gitee.com/openharmony/sensors_miscdevice) part compartments, respectively. when selecting a part, the product may select either or both parts as needed. This requires that the startup file of the hsensors process be placed in a separate start-up part compartment, shared by the two parts, so that any part silo with the starter part can start the hsensors process and prevent duplicate start-up of the process.
-Service startup profiles for sensor and small device services such as vibrator are in the sa_profile directory of [sensors\_sensor](https://gitee.com/openharmony/sensors_sensor) and [sensors\_miscdevice](https://gitee.com/openharmony/sensors_miscdevice) part, respectively.The resulting system/profile/hsensors.xml file is compiled, as follows.Of these, 3601 and 3602 serve the sensor and vibrator.If only the [sensors\_sensor](https://gitee.com/openharmony/sensors_sensor) code is compiled, the hsensors.xml file contains only the configuration items for the 3601 service. The hsensors.xml file starts the service when the hsensors process is started. +The repository places the startup file of the sensors process to start sensor and small device services such as vibrator. Sensor and small device services such as vibrator share the sensors process.
+Service code for sensor and small device services such as vibrator is [sensors\_sensor](https://gitee.com/openharmony/sensors_sensor) and [sensors\_miscdevice](https://gitee.com/openharmony/sensors_miscdevice) part compartments, respectively. when selecting a part, the product may select either or both parts as needed. This requires that the startup file of the sensors process be placed in a separate start-up part compartment, shared by the two parts, so that any part silo with the starter part can start the sensors process and prevent duplicate start-up of the process.
+Service startup profiles for sensor and small device services such as vibrator are in the sa_profile directory of [sensors\_sensor](https://gitee.com/openharmony/sensors_sensor) and [sensors\_miscdevice](https://gitee.com/openharmony/sensors_miscdevice) part, respectively.The resulting system/profile/sensors.xml file is compiled, as follows.Of these, 3601 and 3602 serve the sensor and vibrator.If only the [sensors\_sensor](https://gitee.com/openharmony/sensors_sensor) code is compiled, the sensors.xml file contains only the configuration items for the 3601 service. The sensors.xml file starts the service when the sensors process is started. ``` - hsensors + sensors libmiscdevice_service.z.so libsensor_service.z.so diff --git a/README_zh.md b/README_zh.md index cf4e3d5..17ddcaf 100755 --- a/README_zh.md +++ b/README_zh.md @@ -6,7 +6,7 @@ - [相关仓](#section96071132185310) ## 简介 -sensors_start仓归属于[泛sensor服务子系统](https://gitee.com/openharmony/docs/blob/master/zh-cn/readme/%E6%B3%9BSensor%E5%AD%90%E7%B3%BB%E7%BB%9F.md),该仓主要提供了泛sensor服务进程(即hsensors)的启动文件。
+sensors_start仓归属于[泛sensor服务子系统](https://gitee.com/openharmony/docs/blob/master/zh-cn/readme/%E6%B3%9BSensor%E5%AD%90%E7%B3%BB%E7%BB%9F.md),该仓主要提供了泛sensor服务进程(即sensors)的启动文件。
## 目录 @@ -15,16 +15,16 @@ sensors_start仓的目录结构如下: ``` /base/sensors/start ├── etc - └── init # 放置hsensors进程的启动文件 + └── init # 放置sensors进程的启动文件 ``` ## 使用 -泛sensor服务子系统提供了sensor服务和miscdevice服务,分别在[sensors\_sensor](https://gitee.com/openharmony/sensors_sensor)和[sensors\_miscdevice](https://gitee.com/openharmony/sensors_miscdevice)部件仓。产品根据需要可能选择其中一个服务或者两个服务都选择。因此将hsensors进程的启动文件单独放置在sensors_start仓,由这两个服务共享,这样任何一个服务搭配启动部件就可以启动hsensors进程,防止重复启动进程。
-sensor服务和miscdevice服务的启动配置文件分别在[sensors\_sensor](https://gitee.com/openharmony/sensors_sensor)和[sensors\_miscdevice](https://gitee.com/openharmony/sensors_miscdevice)仓中sa_profile目录下,编译后生成hsensors.xml文件,内容如下所示: +泛sensor服务子系统提供了sensor服务和miscdevice服务,分别在[sensors\_sensor](https://gitee.com/openharmony/sensors_sensor)和[sensors\_miscdevice](https://gitee.com/openharmony/sensors_miscdevice)部件仓。产品根据需要可能选择其中一个服务或者两个服务都选择。因此将sensors进程的启动文件单独放置在sensors_start仓,由这两个服务共享,这样任何一个服务搭配启动部件就可以启动sensors进程,防止重复启动进程。
+sensor服务和miscdevice服务的启动配置文件分别在[sensors\_sensor](https://gitee.com/openharmony/sensors_sensor)和[sensors\_miscdevice](https://gitee.com/openharmony/sensors_miscdevice)仓中sa_profile目录下,编译后生成sensors.xml文件,内容如下所示: ``` - hsensors + sensors libmiscdevice_service.z.so libsensor_service.z.so @@ -45,7 +45,7 @@ sensor服务和miscdevice服务的启动配置文件分别在[sensors\_sensor](h ``` -其中3601和3602分别为sensor服务和马达服务。若仅编译[sensors\_sensor](https://gitee.com/openharmony/sensors_sensor)仓代码,hsensors.xml文件中则仅包含3601服务的配置项。启动hsensors进程时会加载hsensors.xml文件启动对应的服务。 +其中3601和3602分别为sensor服务和马达服务。若仅编译[sensors\_sensor](https://gitee.com/openharmony/sensors_sensor)仓代码,sensors.xml文件中则仅包含3601服务的配置项。启动sensors进程时会加载sensors.xml文件启动对应的服务。 ## 相关仓 diff --git a/etc/init/BUILD.gn b/etc/init/BUILD.gn index 4be9e39..216b0a6 100755 --- a/etc/init/BUILD.gn +++ b/etc/init/BUILD.gn @@ -1,5 +1,5 @@ # Copyright (c) Huawei Technologies Co., Ltd. 2019-2019. All rights reserved. -# Description: add hsensors boot rc file compile script +# Description: add sensors boot rc file compile script # Author: ningyanlei # Create: 2019-08-30 @@ -7,11 +7,11 @@ import("//build/ohos.gni") ################################################################################ -ohos_prebuilt_etc("hsensors.rc") { +ohos_prebuilt_etc("sensors.rc") { if (use_musl) { - source = "hsensors.cfg" + source = "sensors.cfg" } else { - source = "hsensors.rc" + source = "sensors.rc" } relative_install_dir = "init" subsystem_name = "sensors" diff --git a/etc/init/hsensors.rc b/etc/init/hsensors.rc deleted file mode 100755 index df3ef46..0000000 --- a/etc/init/hsensors.rc +++ /dev/null @@ -1,8 +0,0 @@ -on post-fs-data - start hsensors - -service hsensors /system/bin/sa_main /system/profile/hsensors.xml - class hsensors - user system - group system shell - seclabel u:r:foundation:s0 diff --git a/etc/init/hsensors.cfg b/etc/init/sensors.cfg similarity index 66% rename from etc/init/hsensors.cfg rename to etc/init/sensors.cfg index 4aa84c7..3187a2f 100755 --- a/etc/init/hsensors.cfg +++ b/etc/init/sensors.cfg @@ -6,13 +6,13 @@ }, { "name" : "boot", "cmds" : [ - "start hsensors" + "start sensors" ] } ], "services" : [{ - "name" : "hsensors", - "path" : ["/system/bin/sa_main", "/system/profile/hsensors.xml"], + "name" : "sensors", + "path" : ["/system/bin/sa_main", "/system/profile/sensors.xml"], "uid" : "system", "gid" : ["system", "shell"] } diff --git a/etc/init/sensors.rc b/etc/init/sensors.rc new file mode 100755 index 0000000..e6be018 --- /dev/null +++ b/etc/init/sensors.rc @@ -0,0 +1,8 @@ +on post-fs-data + start sensors + +service sensors /system/bin/sa_main /system/profile/sensors.xml + class sensors + user system + group system shell + seclabel u:r:foundation:s0 diff --git a/ohos.build b/ohos.build index 7d02bf0..c762fda 100755 --- a/ohos.build +++ b/ohos.build @@ -9,7 +9,7 @@ "intellitv" ], "module_list": [ - "//base/sensors/start/etc/init:hsensors.rc" + "//base/sensors/start/etc/init:sensors.rc" ] } }