diff --git a/recipes-openharmony/openharmony/files/param.service b/recipes-openharmony/openharmony/files/param.service new file mode 100644 index 0000000000000000000000000000000000000000..63b63434277cb905e3900cd788fba83c6a4a473f --- /dev/null +++ b/recipes-openharmony/openharmony/files/param.service @@ -0,0 +1,12 @@ +[Unit] +Description=OpenHarmony Param Service +Requires=openharmony-preinit.service +After=openharmony-preinit.service + +[Service] +Type=exec +ExecStartPre=install -m 755 -d /dev/unix/socket +ExecStart=/usr/bin/param_service /system/etc/ohos.para + +[Install] +WantedBy=multi-user.target diff --git a/recipes-openharmony/openharmony/files/param.service.license b/recipes-openharmony/openharmony/files/param.service.license new file mode 100644 index 0000000000000000000000000000000000000000..98a0b3f4a5b8db268215a128c7d06e0a10897e73 --- /dev/null +++ b/recipes-openharmony/openharmony/files/param.service.license @@ -0,0 +1,3 @@ +# SPDX-FileCopyrightText: Huawei Inc. +# +# SPDX-License-Identifier: Apache-2.0 diff --git a/recipes-openharmony/openharmony/openharmony-standard_3.0.bb b/recipes-openharmony/openharmony/openharmony-standard_3.0.bb index e66ae5486f44cbb3d8306ddeae4c4a57dbab5651..f03f44e3993cbd3258a662fc72ce329321b7c0c5 100644 --- a/recipes-openharmony/openharmony/openharmony-standard_3.0.bb +++ b/recipes-openharmony/openharmony/openharmony-standard_3.0.bb @@ -1496,6 +1496,13 @@ RDEPENDS:${PN}-hdc += "${PN}-libutils ${PN}-syspara libcrypto" RDEPENDS:${PN} += "${PN}-hdc" PACKAGES =+ "${PN}-param-service" +SYSTEMD_PACKAGES += "${PN}-param-service" +SYSTEMD_SERVICE:${PN}-param-service = "param.service" +SRC_URI += "file://param.service" +do_install:append() { + install -d ${D}/${systemd_unitdir}/system + install -m 644 ${WORKDIR}/param.service ${D}${systemd_unitdir}/system/ +} FILES:${PN}-param-service = " \ ${bindir}/getparam \ ${bindir}/setparam \