diff --git a/recipes-openharmony/openharmony/files/distributed_data.service b/recipes-openharmony/openharmony/files/distributed_data.service index 4ce37814c7200ffae678db543e50fb5c3c62378d..dc2e7c51d38be98e37979f2265c2e9845789e6bc 100644 --- a/recipes-openharmony/openharmony/files/distributed_data.service +++ b/recipes-openharmony/openharmony/files/distributed_data.service @@ -1,10 +1,21 @@ [Unit] -Description=OpenHarmony Distributed Data service +Description=OpenHarmony Distributed Data service (SA: 1301) +Requires=samgr.service +After=samgr.service +# Logging to hilogd, but seems to work without it +Wants=hilogd.service +After=hilogd.service +# Requires SA: 4700 +Wants=dsoftbus.service [Service] -Type=oneshot -ExecStart=/bin/echo "OpenHarmony Distributed Data Service" -RemainAfterExit=yes +Type=notify +User=system +Group=system +SupplementaryGroups=shell readproc +CapabilityBoundingSet=CAP_DAC_READ_SEARCH +LimitNICE=40 +ExecStart=/usr/bin/sa_main /system/profile/distributeddata.xml [Install] WantedBy=multi-user.target diff --git a/recipes-openharmony/openharmony/files/openharmony-preinit b/recipes-openharmony/openharmony/files/openharmony-preinit index c6ec2f1c7fe77f9385e004faf4502b75ddcab971..f48b6f1471fd3815d7d9c0e2f8415a84a7219d0f 100644 --- a/recipes-openharmony/openharmony/files/openharmony-preinit +++ b/recipes-openharmony/openharmony/files/openharmony-preinit @@ -136,23 +136,6 @@ fi #sa_main /system/profile/dps_service.xml & # SA: 1401 180 3502 #sleep "$STARTUP_CMD_SLEEP" -# trigger: boot -# "name" : "distributeddata", -# "path" : ["/system/bin/sa_main","/system/profile/distributeddata.xml"], -# "caps" : ["DAC_READ_SEARCH"], -# "uid" : "system", -# "gid" : ["system","shell","readproc"], -# "writepid":[ -# "/dev/cpuset/foreground/tasks", -# "/dev/stune/foreground/tasks", -# "/dev/blkio/foreground/tasks" -# ] -if systemctl -q is-enabled distributed_data.service; then - echo >/dev/console "Starting OpenHarmony distributeddata service" - su system -c '/system/bin/sa_main /system/profile/distributeddata.xml &' # SA: 1301 - sleep "$STARTUP_CMD_SLEEP" -fi - # trigger: boot # "name" : "time_service", # "path" : ["/system/bin/sa_main", "/system/profile/time_service.xml"], diff --git a/recipes-openharmony/openharmony/openharmony-standard_3.0.bb b/recipes-openharmony/openharmony/openharmony-standard_3.0.bb index 26c9b63ec18ecc968443474661f26e1742d626e2..f61d5dd228ae3af43dd646551db9a1dabe945cb2 100644 --- a/recipes-openharmony/openharmony/openharmony-standard_3.0.bb +++ b/recipes-openharmony/openharmony/openharmony-standard_3.0.bb @@ -2037,6 +2037,7 @@ USERADD_PARAM:${PN} = "-u 1000 -U -s /bin/sh system" USERADD_PARAM:${PN}:append = ";-u 1007 -U -s /bin/false log" USERADD_PARAM:${PN}:append = ";-u 1036 -U -s /bin/false logd" USERADD_PARAM:${PN}:append = ";-u 2000 -U -s /bin/false shell" +USERADD_PARAM:${PN}:append = ";-u 3009 -U -s /bin/false readproc" # system haps PACKAGES =+ "${PN}-systemhaps"